Monday, 19 August 2013

Running Visual Studio devenv to build current solution dependencies

Running Visual Studio devenv to build current solution dependencies

On my C# Build Events -> Pre-build event command line, I have the following:
call "$(DevEnvDir)..\Tools\vsvars32.bat"
"$(DevEnvDir)devenv.exe" "$(SolutionDir)..\MySolution\MySolution.sln"
/build $(Configuration)
which is supposed to build DLLs and EXEs to be used by the current
project. I am stuck on this simple building command on visual studio...
The following is the output of the command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1063,5):
error MSB3073: call "C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE..\Tools\vsvars32.bat"
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1063,5):
error MSB3073: "C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\devenv.exe"
"C:\files\tempWorkfiles\MySolution\MySolution.sln" /build Debug" exited
with code 1.
There doesn't seem to be anything wrong with the batch file (call
"$(DevEnvDir)..\Tools\vsvars32.bat") because if I take that out, it
successfully builds. My guess is the last argument to build with devenv. I
quoted everything to take care of spaces too..
Any other suggestions or links as guidance?
Thanks!

No comments:

Post a Comment