MSBuild vs NMVCBuild

0 Likes

Problem:

When building with instrumentation from the command line, and depending on your version of Visual Studio, you will either have to invoke MSBuild or NMVCBuild. Without understanding the differences in setup for either build utility, chances are, attempting to successfully build your solution may prove difficult.



Resolution:

*For Visual Studio Versions 2008 and prior

1. Ensure that NMVCBUILD is in the "path" (Enviornment Settings)

2. Ensure that VCBuild is in the "path" (Environment Settings)

3. When opening a command prompt, navigate to the vcvars32.bat from the version of Visual Studio that your project was created from, and execute from that directory.

4. To execute the build from the command line, navigate to your project and run the following: “nmvcbuild/nmbcon  projectName.proj"

*For Visual Studio Version 2010 and onward

**NMVCBuild and VCbuilld are now irrelevant

1. Open a command window, navigate to vcvars32.bat from the version of Visual studio used for your project

2. From the command line, navigate to the folder that has the "sln" file and excute the following:  "msbuild projectName.sln"

*Note: MSBuild is ran against the solution file, whereas NMVCBbuild in VS2008 and prior is ran against the project file.

Comment List
Anonymous
Related Discussions
Recommended