Quantcast
Channel: MSBuild forum
Viewing all 2763 articles
Browse latest View live

How to fix error LNK2001 for std::pair?

$
0
0

I'm currently developing a C++ application using MFC using VS 2010, the problem is that when I try to compile the project for release (the debug compilation works and can run the program without failures) I get the following errors from the compiler after Searching for the libraries:

1>  Finished searching libraries
1>CropFullFrontal.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Pair_base<float,float>::_Pair_base<float,float>(struct std::_Pair_base<float,float> const &)" (__imp_??0?$_Pair_base@MM@std@@QAE@ABU01@@Z)
1>CropFullFrontal.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::pair<float,float>::pair<float,float>(struct std::pair<float,float> const &)" (__imp_??0?$pair@MM@std@@QAE@ABU01@@Z)
1>C:\projects\N\Release\N.exe : fatal error LNK1120: 2 unresolved externals

I've checked the code of CropFullFrontal (both the .cpp file and the .h file) and pair never appears. As this error is common I googled it and the most forums or topics about this error mention changing the Runtime Library to MD, as I already did this I have no idea of what could be wrong with my project. I cannot include the project because there are a lot of files and it even includes some not free frameworks, but I can include the vcxproj file:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{2C70EA3D-4264-4996-A28E-895454CD31FB}</ProjectGuid>
    <RootNamespace>N</RootNamespace>
    <Keyword>MFCProj</Keyword>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <CharacterSet>Unicode</CharacterSet>
    <UseOfMfc>Dynamic</UseOfMfc>
    <UseOfAtl>false</UseOfAtl>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
    <UseOfMfc>Dynamic</UseOfMfc>
    <UseOfAtl>Dynamic</UseOfAtl>
    <CLRSupport>false</CLRSupport>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;C:\projects\util\libxml;C:\Projects\util\BioMetrics\NBIS\commonbis\include;C:\Projects\util\BioMetrics\NBIS\nfiq\include;C:\Projects\util\BioMetrics\NBIS\mindtct\include;C:\Projects\util\BioMetrics\NBIS\an2k\include;C:\Projects\util\BioMetrics\NBIS\imgtools\include;c:\projects\util;c:\projects\util\iconv;C:\FVSDK_8_1_0\include;c:\projects\util\openssl\include;C:\projects\util\libhqldll\include</IncludePath>
    <TargetName>NManager</TargetName>
    <LibraryPath>$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;C:\FVSDK_8_1_0\lib\x86_32\msc_9.0_crtdll_g;C:\projects\N\_test\caso2\sqlite-dll;C:\projects\N\lib</LibraryPath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;C:\Projects\util\BioMetrics\NBIS\commonbis\include;C:\Projects\util\BioMetrics\NBIS\nfiq\include;C:\Projects\util\BioMetrics\NBIS\mindtct\include;C:\Projects\util\BioMetrics\NBIS\an2k\include;C:\Projects\util\BioMetrics\NBIS\imgtools\include;c:\projects\util;c:\projects\util\iconv;c:\projects\util\openssl\include;C:\projects\util\libhqldll\include;C:\FVSDK_8_1_0\include</IncludePath>
    <LibraryPath>C:\Program Files\Microsoft Visual Studio 10.0\VC\lib;C:\projects\N\lib;C:\projects\N\_test\caso2\sqlite-dll;C:\FVSDK_8_1_0\lib\x86_32\msc_9.0-ipp_crtdll;$(LibraryPath)</LibraryPath>
    <ExcludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(MSBuildToolsPath32);$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;</ExcludePath>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions);__NBIS_JASPER__</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
      <RegisterOutput>false</RegisterOutput>
      <OutputFile>$(OutDir)NManager$(TargetExt)</OutputFile>
      <AdditionalDependencies>wldap32.lib;rpcrt4.lib;libfrsdk-8.1.0d.lib;wsock32.lib;itc.libutild.lib;libcblasd.lib;libcifrad.lib;libfetd.lib;sqldlld.lib;libiheadd.lib;libimaged.lib;libioutild.lib;libjasperd.lib;libjpegbd.lib;libjpegld.lib;libmindtctd.lib;libmlpd.lib;libnfiqd.lib;libnd.lib;libnmancfgd.lib;librepositoriod.lib;libtiff.lib;libutild.lib;libwsqd.lib;sqlite3.lib</AdditionalDependencies>
      <IgnoreSpecificDefaultLibraries>libcmtd.lib</IgnoreSpecificDefaultLibraries>
    </Link>
    <Midl>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <ValidateAllParameters>true</ValidateAllParameters>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ResourceCompile>
      <Culture>0x0c0a</Culture>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <RegisterOutput>true</RegisterOutput>
      <OutputFile>$(OutDir)N$(TargetExt)</OutputFile>
      <AdditionalDependencies>wldap32.lib;wsock32.lib;rpcrt4.lib;itc.libutil.lib;libcblas.lib;libcifra.lib;libfet.lib;sqldll.lib;libihead.lib;libimage.lib;libioutil.lib;libjasper.lib;libjpegb.lib;libjpegl.lib;libmindtct.lib;libmlp.lib;libnfiq.lib;libn.lib;libnmancfg.lib;librepositorio.lib;libtiff.lib;libutild.lib;libwsq.lib;sqlite3.lib;libfrsdk-8.1.0.lib</AdditionalDependencies>
      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
      <IgnoreSpecificDefaultLibraries>libcmt.lib;msvcrtd.lib;msvcprtd.lib;msvcmrtd.lib;msvcurtd.lib</IgnoreSpecificDefaultLibraries>
      <AdditionalLibraryDirectories>
      </AdditionalLibraryDirectories>
      <ShowProgress>LinkVerboseLib</ShowProgress>
    </Link>
    <Midl>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <ValidateAllParameters>true</ValidateAllParameters>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ResourceCompile>
      <Culture>0x0c0a</Culture>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ResourceCompile Include="..\util\libutil.rc" />
    <ResourceCompile Include="N.rc" />
  </ItemGroup>
  <ItemGroup>
    <Library Include="lib\itc.libutild.lib" />
    <Library Include="lib\liban2kd.lib" />
    <Library Include="lib\libcblasd.lib" />
    <Library Include="lib\libcifrad.lib" />
    <Library Include="lib\libfetd.lib" />
    <Library Include="lib\libhqld.lib" />
    <Library Include="lib\libiheadd.lib" />
    <Library Include="lib\libimaged.lib" />
    <Library Include="lib\libioutild.lib" />
    <Library Include="lib\libjasperd.lib" />
    <Library Include="lib\libjpegbd.lib" />
    <Library Include="lib\libjpegld.lib" />
    <Library Include="lib\libmindtctd.lib" />
    <Library Include="lib\libmlpd.lib" />
    <Library Include="lib\libnfiqd.lib" />
    <Library Include="lib\libnd.lib" />
    <Library Include="lib\libnmancfgd.lib" />
    <Library Include="lib\librepositoriod.lib" />
    <Library Include="lib\libserialkeycpp.lib" />
    <Library Include="lib\libtiff.lib" />
    <Library Include="lib\libutild.lib" />
    <Library Include="lib\libwsqd.lib" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
  <ProjectExtensions>
    <VisualStudio>
      <UserProperties RESOURCE_FILE="N.rc" _x007B_8856F961-340A-11D0-A96B-00C04FD705A2_x007D_="CWebBrowser2" />
    </VisualStudio>
  </ProjectExtensions>
</Project>

Finally, I include some c++ standard libraries in the code so I believe the msvcprt.lib is included instead of only msvcrt.lib

I really appreciate if anybody can help me to solve this issue


Setup project build but throws error at the end when run

$
0
0

I have recently migrated from VS 2010 to VS 2013. At first VS 2013 would not recognize my set up project with .vdproj extension. After trying couple of time with the recommended Install Shield path to upgrade, I gave up on that. I was glad to find Microsoft visual studio installer project released in 4/2014. After installing this module, VS 2013 recognized my .vdproj project and compiled it with out any errors. I do have a custom actions in the Commit phase.

When I run this installation though - at the very end I get an error. What do I need to do to fix this error. After the error

installation reverses and uninstall my files completely. Thanks

VS2013 shows 1 project failed to build but no errors

$
0
0

I have an MVC web app solution with 31 projects.   1 project fails to build.  

========== Rebuild All: 30 succeeded, 1 failed, 0 skipped ==========

However, there are no errors on the "Errors" tab nor in the Output so I am not sure what the issue is.

How do you track down the root cause when this happens?

VS2013 Update 3

Win2012

How to calculate 275000000000000 (Hz)+4321123,11234567(Hz)?

$
0
0

 How to calculate 275000000000000 (Hz)+4321123,11234567(Hz)?

Result in Excel :

4321123,1122,75E+14275000004321123,000000

VS2013 - Native C++ Win32 project - C1033: cannot open program database ' '

$
0
0

I am working with a Native C++ Win32 dll project that I recently upgraded to VS2013.  At first everything worked fine and now I'm getting the C1033 program database error with a blank name:

1>------ Rebuild All started: Project: XXX, Configuration: Release Win32 ------
1>  stdafx.cpp
1>stdafx.cpp : fatal error C1033: cannot open program database ''
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I've looked at the suggestions in this thread on C1033.  The answer in that thread was to troubleshoot compatibility on the VS shortcut.  I had actually done that only on the exe (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe) so that the IDE would start as Admin since my log in is a part of the Administrators group.  I think this may have been when my issues started.

Do you have any suggestions on how to troubleshoot this error?

Thanks!

OS: Windows 8 Enterprise, 64-bit 

How to know local workspace path in a post-build event command line?

$
0
0

I've migrated our code from VSS and VS2008 to TFS2012 and VS2013.  I have scores of projects with post-build event command line scripts that refer to a fixed file path, e.g. "C:\Projects\Common\xxx.SignTool.exe".  We have a small team and all developers downloaded the VSS code to C:\Projects\...

Now with tfs each developer needs a unique local folder for their workspace on a given PC.  How to know local workspace path in a post-build event command line? 

I hope to have something like this "%WkSp%Common\xxx.SignTool.exe"

Using Reflection.Assembly to Load Forms from a Table c#

$
0
0

I have in my project mdiparent and some childs form, in this Mdiparent ihave create treeview and populate it from data base(works fine) .. all name of childforms are in database tableName"Forms and FormsGrp"
how i can call this child forms(by its name) on MouseDoubleClick on tree node using "Reflection", other way using if and looping for "formsname"s solve that but idont want this looping? i Generate this code but somthing error or missing in calling form! Get Message NullReferenceException!!

public partial class frmMainSys : Form
{
    frmDoctors Doctors;
    (and all forms name here)
    DataTable dt;
    SqlDataReader dr;
    TreeNode parentNode = null;

    public frmMain()
    {

        InitializeComponent();
        this.Tree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.Tree_MouseDoubleClick);

    }

    private void frmMainSys_Load(object sender, EventArgs e)
    {
        DataTable dt;
        //// ************ load Tree***************//
        DBAccess db = new DBAccess();
        dt = db.ExcuteDataTable("SELECT ID,EngName,Rank FROM FormsGrp ");
        foreach (DataRow dr in dt.Rows)
        {
            parentNode = Tree.Nodes.Add(dr["EngName"].ToString());
            Populate(Convert.ToInt32(dr["ID"].ToString()), parentNode);
            Tree.Parent.Font = new System.Drawing.Font("tahoma", 8, FontStyle.Bold);
            Tree.ImageList = imgList;
            // Set the TreeView control's default image and selected image indexes.
            Tree.ImageIndex = 1;
            Tree.SelectedImageIndex = 0;

        }

    }

    //// ************ populate TreeView***************//

    private void Populate(int parentId, TreeNode parentNode)
    {

        DBAccess db = new DBAccess();
        DataTable dt;
        dt = db.ExcuteDataTable("SELECT Frm_Code,frm_Name,FROM Forms WHERE Level=" + parentId + "");
        foreach (DataRow ds in dt.Rows)
        {

            if (parentNode == null)
            {
                parentNode.Tag = Tree.Nodes.Add(ds["Frm_Code"].ToString());
                parentNode = Tree.Nodes.Add(ds["frm_Name"].ToString());
                parentNode = Tree.Nodes.Add(ds["Frm_Code"].ToString());
                parentNode.Text = dr["EngName"].ToString();
                Tree.Nodes.Add(parentNode);


            }

            else
            {
                //parentNode = Tree.Nodes.Add(ds["Frm_Code"].ToString());
                parentNode = Tree.Nodes.Add(ds["frm_Name"].ToString());
                parentNode = parentNode.Nodes.Add(ds["frm_Name"].ToString());
                //parentNode.Text = dr["frm_Name"].ToString();
            }

        }

    }

    private void Tree_MouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
    {
        //MessageBox.Show(e.Node.Text);
        Assembly ass = Assembly.GetExecutingAssembly();
        Form frm = (Form)ass.CreateInstance("MyTree"+ "." + e.Node.Text);
        if (frm == null)
        {
             frm.MdiParent = this;
            frm.Show();



        }
    }

How to Publish WCF Service using MSBUILD

$
0
0

Environment: VS2010 and TFS 2010 on Microsoft Virtual PC

Am trying to mimic the PUBLISH call essentially done in IDE using MSBUILD and so far when I issue the publish command, it only generates the DLL, it does not generate the *.svc files nor the web.config

Appreciate any pointers.

Thanks!


VS2013 MSBuild error that does not occur with .Net V4.0 Framework.

$
0
0

I have VS2013 installed on a "clean" Windows 7 VM. Also installed in the system is the V4.0 .Net Framework. The following is a sample build script that demonstrates a problem I am having with a much larger script

<!-- *****************************-->
     <!DOCTYPE Project [
       <!ENTITY e_DefaultValue "Hello World">
     ]>
 
  <Project DefaultTargets="Display" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
      <MsgStr>&e_DefaultValue;</MsgStr>
    </PropertyGroup>
 
    <Target Name="Display">
      <Message Text='$(MsgStr)' />
    </Target>
 
</Project>

If I attempt to run the snippet using the VS2013 MSBuild executable, I get the following error:
 
The project file could not be loaded. Reference to undeclared entity 'e_DefaultValue'.
 
If I run it with the .Net v4.0 Framework version, it displays the message correctly.
 
Is this an issue where the VS2013 MSBuild needs something else defined?

How to Publish WCF Service Library

$
0
0
Hi all.  I've created a WCF Service Library project in VS2008 and I can turn it into something runnable by IIS by doing Build->Publish (which creates a Web.config and necessary .svc files).  Is there a way to do this Publish via msbuild or the command line on my build machine?  (Which would take my WCF Service Library csproj and create the necessary Web.config and .svc files).

Thanks!
Jason.

Microsoft build Tools 2013 - change install folder

$
0
0

Hi,

I want to install Microsoft Build Tools 2013 (http://www.microsoft.com/en-us/download/details.aspx?id=40760) but not in default folder.

Is it possible? How can I change that?

How to package a .Net dektop app installation so it can be downloaded

$
0
0
Okay, I looked through the forums and thought this would be a common questions, but I could not find the answer. Here is the issue. I have an setup.exe, which is an installation for a .Net Desktop application.  I would like end users to be able to go to a site and download the exe and install it.  The problem is that browsers and other security programs try to prevent it even though it is safe.  How do I package my exe so it is not subject to these security walls.  It is digitally signed by a third party but that only makes it look safe once it is already installing.  The problem is the download.  I have read some things about creating a self-extracting zip file, but it seems that would run into the same issues.  Any ideas would be appreciated.  Thank you in advance.

Condition in MSBuild

$
0
0

Does anybody has any simple example about the MSBuild condition. I want to learn condition of MSBuild.

MSBuild command

$
0
0

How to use MSBuild command to deploy a database project?

Visual Studio 2013 SP2 Nmake problem

$
0
0

Hi,

NOTE:   This problem is with NMake, and not MSBuild.    Please read the description before replying.

    I have just upgraded to a new laptop with Win 7 64bit (Enterprise), VS 2013 SP1 (Pro) / 2.     Everything was working fine with all of my files after the conversion from VS 2008 to VS 2013 SP1.    I use a batch file to run all my Makefile's for all of my projects.   Well, last week, I upgraded to VS 2013 SP2.   I then went through several projects and checked their functionality from the IDE.  Everything was good.   Yesterday, I tried to run my overall batch file to run all the makefile's.   I have been using the same file for several years and it has worked fine.   Well, the batch file works.  It runs the nmake -a  in every directory for every project I have.    The problem that I have is the NMake utility is no longer running / executing the DOS commands that are in the makefile.      I have several commands like     if exist bin    rd /s/q bin     and the command does not execute.  The NMAKE program sees the line, does not complain, just outputs the line and does not execute it.     I have tried putting the  !  and the   -   in front of the line and no joy.       If I run the above command at the DOS prompt in the directory it works fine.    If i put any type of    DOS command       rd /s /q  bin    or     copy   bin\debug\*      <some other dir>,     the Nmake program says that it cannot find the program.     If I put a command line     dir on a line, it fails.      If I put a command like     ls.exe on the line it works.     The dependencies in the make file work fine.      It is just that trying to execute   DOS commands to clean the directory up before forcing a make from scratch no longer work.        I first saw symptoms of this because my Makefiles had  a line like      msbuild  /nologo      project.sln     >output.txt       and it would always fail.    If I remove the    >output.txt it works fine.      If I put in    /filelogger,  it works fine (without the >output.txt).   But I wrote all these makefiles years ago and have been loath to change them.    

NOTE:   So the point / problem is that I did something somehow that screwed up the ability of  NMake to execute DOS commands except for  echo.    I am looking for some possible solution before I try and un-install the software and re-install.

I can provide simple example of output, code, project if someone wants it.   I can provide dumps of the nmake with /D, etc.     I am just hoping that I screwed up something easy to fix.

Thanks!





Can I change the Source control folder from the TFSBuild.proj ?

$
0
0

Hello,

I have a simple question:

Can I change the Source control folder ( Edit Build Definition -> WorkSpace ->Source control folder  ) from the TFSBuild.proj ?

If yes ? how can I do this ?

Thank you

Houssam

Post Build command exited with code 1 on x64 configuration rather work on x86 after upgrade from VS 2010 to 2013

$
0
0

I have a project with a post build event for both x86 and x64 architecture. I have just upgraded my visual studio from 2010 to 2013.

Post Build Script:
x86

<PostBuildEvent Condition="'$(Platform)'=='x86'">
  rmdir /s /q "$(TargetDir)DataAccess"
  mkdir "$(TargetDir)DataAccess"
  mkdir "$(TargetDir)DataAccess\Resources"
  rmdir /s /q "$(TargetDir)Modules\IddFiles"
  rmdir /s /q "$(TargetDir)Modules"
  mkdir "$(TargetDir)Modules"
  mkdir "$(TargetDir)Modules\IddFiles"
  rmdir /s /q "$(TargetDir)Templates"
  mkdir "$(TargetDir)Templates"
  mkdir "C:\Users\Public\Simergy\LibrariesAndTemplates"
  rmdir /s /q "$(TargetDir)Components\HvacTemplateExpansion"
  mkdir "$(TargetDir)Components\HvacTemplateExpansion"

  rmdir /s /q "$(TargetDir)Stencils"
  mkdir "$(TargetDir)Stencils"
  rmdir /s /q "$(TargetDir)Images"
  mkdir "$(TargetDir)Images"
  rmdir /s /q "$(TargetDir)Help"
  mkdir "$(TargetDir)Help"
  copy "$(SolutionDir)ThirdPartyLibraries\Infragistics\CLR4.0_2013.2_2023\*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\DevExpress\13.1.6\DevExpress*.*" "$(TargetDir)"

  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\*.*" "$(TargetDir)Modules"
  del "$(TargetDir)Modules\Kitware.*
  del "$(TargetDir)Modules\simplebim.Developer.Libraries.*
  del "$(TargetDir)Modules\IFCEngine.dll"

  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\Kitware*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\simplebim.Developer.Libraries.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Nevron\*.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.dll*" "$(TargetDir)Modules"
  copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.idd*" "$(TargetDir)Modules\IddFiles"
  copy "$(SolutionDir)ThirdPartyLibraries\LBNL\Modules\*.**" "$(TargetDir)Modules"
  copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.dll*" "$(TargetDir)Modules\"
  copy "$(SolutionDir)ThirdPartyLibraries\CadLib\*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.exp*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\IfcUtilities\*.dll*" "$(TargetDir)"


  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\IfcEngine.dll" "$(TargetDir)"

  copy "$(SolutionDir)MyModules\x86\*.*" "$(TargetDir)Modules"
  xcopy /E "$(SolutionDir)Images" "$(TargetDir)Images"
  copy "$(SolutionDir)*.ndx" "$(TargetDir)"
  copy "$(SolutionDir)*.nlb" "$(TargetDir)"
  copy "$(SolutionDir)*.ifc" "$(TargetDir)"
  copy "$(SolutionDir)*.png" "$(TargetDir)"
  copy "$(SolutionDir)Systems\Stencils\*.nlb" "$(TargetDir)Stencils"
  copy "$(SolutionDir)Systems\Stencils\*.ndx" "$(TargetDir)Stencils"
  copy "$(SolutionDir)DataAccess\Resources\*.*" "$(TargetDir)DataAccess\Resources"
  xcopy /E "$(SolutionDir)Templates" "$(TargetDir)Templates"
  rmdir /s /q "$(TargetDir)Templates\OlderVersions"

  copy "$(SolutionDir)Help\*.*" "$(TargetDir)Help"
  del "$(TargetDir)SimAdapter.dll"

  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.xml" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.xml" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.Unity.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.ObjectBuilder2.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\IfcEngine\*.*" "$(TargetDir)"
  copy "$(SolutionDir)DataAccess\TempIDF\*.*" "$(TargetDir)Components\HvacTemplateExpansion"




  call "$(DevEnvDir)..\..\VC\bin\vcvars32"
  call "$(DevEnvDir)..\..\VC\bin\editbin" /LARGEADDRESSAWARE "$(TargetDir)Simergy.exe</PostBuildEvent>

x64

<PostBuildEvent Condition="'$(Platform)'=='x64'">
      rmdir /s /q "$(TargetDir)DataAccess"
        mkdir "$(TargetDir)DataAccess"
        mkdir "$(TargetDir)DataAccess\Resources"
        rmdir /s /q "$(TargetDir)Modules\IddFiles"
        rmdir /s /q "$(TargetDir)Modules"
        mkdir "$(TargetDir)Modules"
        mkdir "$(TargetDir)Modules\IddFiles"
        rmdir /s /q "$(TargetDir)Templates"
        mkdir "$(TargetDir)Templates"
        mkdir "C:\Users\Public\Simergy\LibrariesAndTemplates"
        rmdir /s /q "$(TargetDir)Components\HvacTemplateExpansion"
        mkdir "$(TargetDir)Components\HvacTemplateExpansion"
        rmdir /s /q "$(TargetDir)Stencils"
        mkdir "$(TargetDir)Stencils"
        rmdir /s /q "$(TargetDir)Images"
        mkdir "$(TargetDir)Images"
        rmdir /s /q "$(TargetDir)Help"
        mkdir "$(TargetDir)Help"
        copy "$(SolutionDir)ThirdPartyLibraries\Infragistics\CLR4.0_2013.2_2023\*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\DevExpress\13.1.6\DevExpress*.*" "$(TargetDir)"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\*.*" "$(TargetDir)Modules"
        del "$(TargetDir)Modules\Kitware.*
        del "$(TargetDir)Modules\simplebim.Developer.Libraries.*
        del "$(TargetDir)Modules\IFCEngine.dll"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\Kitware*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\vtk*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\cosmo*.*" "$(TargetDir)"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\vpic.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\simplebim.Developer.Libraries.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Nevron\*.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.dll*" "$(TargetDir)Modules"
        copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.idd*" "$(TargetDir)Modules\IddFiles"
        copy "$(SolutionDir)ThirdPartyLibraries\LBNL\Modules\*.**" "$(TargetDir)Modules"
        copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.dll*" "$(TargetDir)Modules\"
        copy "$(SolutionDir)ThirdPartyLibraries\CadLib\*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.exp*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\IfcUtilities\*.dll*" "$(TargetDir)"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\IfcEngine.dll" "$(TargetDir)"

        copy "$(SolutionDir)MyModules\x64\*.*" "$(TargetDir)Modules"
        xcopy /E "$(SolutionDir)Images" "$(TargetDir)Images"
        copy "$(SolutionDir)*.ndx" "$(TargetDir)"
        copy "$(SolutionDir)*.nlb" "$(TargetDir)"
        copy "$(SolutionDir)*.ifc" "$(TargetDir)"
        copy "$(SolutionDir)*.png" "$(TargetDir)"
        copy "$(SolutionDir)Systems\Stencils\*.nlb" "$(TargetDir)Stencils"
        copy "$(SolutionDir)Systems\Stencils\*.ndx" "$(TargetDir)Stencils"
        copy "$(SolutionDir)DataAccess\Resources\*.*" "$(TargetDir)DataAccess\Resources"
        xcopy /E "$(SolutionDir)Templates" "$(TargetDir)Templates"
        rmdir /s /q "$(TargetDir)Templates\OlderVersions"

        copy "$(SolutionDir)Help\*.*" "$(TargetDir)Help"
        del "$(TargetDir)SimAdapter.dll"

        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.xml" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.xml" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.Unity.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.ObjectBuilder2.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\IfcEngine\*.*" "$(TargetDir)"
        copy "$(SolutionDir)DataAccess\TempIDF\*.*" "$(TargetDir)Components\HvacTemplateExpansion"

        call "$(DevEnvDir)..\..\VC\bin\vcvars32"
        call "$(DevEnvDir)..\..\VC\bin\editbin" /LARGEADDRESSAWARE "$(TargetDir)Simergy.exe</PostBuildEvent><PreBuildEvent></PreBuildEvent>

In Visual Studio 2010, I was able to build with both architecture configuration. Now i am facing problem while compiling the project in x64 architecture every time.

But now i always gets the "exited with code 1" error. Along this i have tried to filter out the issue by referencing below links, but no success at all.
Error when trying to run in VS 2013
Post Build exited with code 1
Post-Build command exited with code 1 (trying to automatically generate NuGet packages)
Command Copy exited with Code 1
FIX: Visual Studio Post Build Event Returns –1 when it should not.
Post-build event with folders which contains spaces

I have tried the attrib -r command before doing the copy of files, but same issue raise every time.

Is there any way to get to the real error and check that what is going wrong?

Edit: Here is post build event for one project, above post build event for the whole solution:

Copy "$(TargetDir)$(TargetName).*" "$(SolutionDir)MyModules\$(Platform)"
Copy "$(SolutionDir)MyModules\$(Platform)" "$(SolutionDir)EnergyPlus_GUI\bin\$(Platform)\$(ConfigurationName)\Modules"

it gives below error message,

Error   3   The command "Copy "D:\DevWorkSpaces\Simergy_Source_Multihread\SIM_ScheduleEditor\bin\x64\Debug\SIM_ScheduleEditor.*" "D:\DevWorkSpaces\Simergy_Source_Multihread\MyModules\x64"
Copy "D:\DevWorkSpaces\Simergy_Source_Multihread\MyModules\x64" "D:\DevWorkSpaces\Simergy_Source_Multihread\EnergyPlus_GUI\bin\x64\Debug\Modules"" exited with code 1.   SIM_ScheduleEditor

-Niranjan Kala http://www.niranjankala.in


How to build a project in VS12 with DB in SQL Server2012

$
0
0

Hi all,

I have developed a vb.net project in VS12 with DB in SQL Server 2012. I need to publish it as .exe or .msi file. But I can't do so in VS2012 ultimate. During publishing, it shows an error 

" System.InvalidOperationException the connection string has not  been initialized" 

visual stuido 2012 update 4 windows 7: error MSB4014: The build stopped unexpectedly because of an internal failure

$
0
0

new laptop with fresh new visual stuido 2012 premium installation. No exact patterns can be found to reproduce it, but do get these error messages from time to time.  See from other forums suggested a restart of VS2012, or a reboot of the machine, BUT those are really not a solution. It comes back sooner or later after several builds.  Also sometime after close visual studio, and try to start it agian, get a "Out of Memory" and visual studio won't start.  My system has 32GB of memory, check memory usage, only <6GB is used. Hard disk also has enough space ~400GB free. Any help is appreciated.

Also noticed that just leave visual studio 2012 there and have a cup of coffee and wait for maybe 15 or 20 or 30 minutes, when you come back, you'll see that no more MSBuilds.exe is running anymore. Then try to build again. The error message is gone! MSbuild is started with parameter /noblogo /nodemode:1 /nr

Configuration:Debug x64
1>C:\MyProject\build\ZERO_CHECK.vcxproj : error MSB4014: The build stopped unexpectedly because of an internal failure.
1>C:\MyProject\\build\ZERO_CHECK.vcxproj : error MSB4014: Microsoft.Build.Exceptions.BuildAbortedException: Build was canceled. Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" launches successfully, and that it is loading the same microsoft.build.dll that the launching process loaded. If the location seems incorrect, try specifying the correct location in the BuildParameters object, or with the MSBUILD_EXE_PATH environment variable.
1>C:\MyProject\build\ZERO_CHECK.vcxproj : error MSB4014:    at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration)
1>C:\MyProject\build\ZERO_CHECK.vcxproj : error MSB4014:    at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
1>C:\MyProject\build\ZERO_CHECK.vcxproj : error MSB4014:    at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
1>C:\MyProject\build\ZERO_CHECK.vcxproj : error MSB4014:    at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
1>C:\MyProject\build\ZERO_CHECK.vcxproj : error MSB4014:    at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
1>C:\MyProject\build\ZERO_CHECK.vcxproj : error MSB4014:    at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker)
1>A task was canceled.


MSBuild deletes "Content"-folder after building it

$
0
0

I have an XNA4 project that I can build just fine with visual studio, but running MSBuild on the same solution file causes the Content-folder (containing newly built .xnb's) to disappear after it's built.

Any insight into what might be the issue here?

Viewing all 2763 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>