MSBuild vs devenv for command line builds

Filip Frącz picture Filip Frącz · Mar 7, 2012 · Viewed 24.1k times · Source

I was wondering: what is the difference between using msbuild and devenv when compiling solutions from the command line?

One obvious thing noticed was that msbuild does build dependent projects not contained within the solution, while devenv does not.

Are there any other? Are there some special flags one could pass to msbuild to make it match the devenv build exactly?

P.S. I'm using Visual Studio 2010 SP1

Answer

shamp00 picture shamp00 · Mar 7, 2012

The main advantage of MSBuild is that you don't need to have Visual Studio installed.

One limitation of MSBuild is that it does not support building Visual Studio setup projects (.vdproj).

(You can work around this by defining an exec task which calls devenv, but then you still need Visual Studio.)