I was about to build a Visual Studio solution file using msbuild. I used the following commandline for building the solution
msbuild.exe SolutionFile.sln /t:Build/p:Configuration=Release;Platform=Win32
Even though the build starts at some point the build is looking hang and fails to move forward as shown below
Done Building Project "D:\SolutionPath\ProjectFile10.vcxproj" (default targets).
There are a lot of .proj
under SolutionFile.sln
those I have to build.
I have to use msbuild.exe
rather than devenv.com
Best Answer
There's a technique for diagnosing what's happening inside msbuild which may help you work out what's happening here. From a command prompt set an environment variable:
Once you have run msbuild then this will generate a
.metaproj
file. This file is what msbuild uses internally but then deletes. You can read it to find out the name of the actual targets are. TheBuild
target is expanded to show what it actually calls. You can then try building the individual targets with the/t
flag of msbuild to work out which target is causing the problem.