1

We have been using Visual studio 2010 - 2013 on the build server using the following MSBuild command so far:

Set msBuilder=%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

However recently we moved to VS 2015, and had to uninstall all other VS versions (for saving space), and used the following build location (partially also to cater compilation of C# 6.0 features):

Set msBuilder =%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe

This seems to work for most of the VS Solutions we have,however for one particular VS solution, when we execute this line:

Set doSolutionBuild=%msBuilder% MySolution.sln /t:clean;Build /p:Configuration=Release;Architecture=x86;Platform=x86 /v:n

it opens and instance of VS 2015 of the same project on the build server and the build process just hangs there in the command prompt.

Can anyone explain how we could resolve this?

sm2mafaz
  • 392
  • 3
  • 15
  • 1
    If %msbuilder% is not defined then the build command becomes " mysolution.sln". And executing it indeed starts VS. Focus on good logging so you can easily see these kind of mishaps, error checking won't hurt either. – Hans Passant Jan 07 '18 at 08:19
  • 3
    Perhaps **`%msBuilder%`** isn't defined and **`%msBuilder %`** is instead! – Compo Jan 07 '18 at 11:03
  • What Compo said may be a possibility. You can try to build this solution with this command prompt or Visual Studio directly, check if this issue still persist? – Leo Liu Jan 08 '18 at 01:55
  • Yes, thanks for the tip from @Comp. Infact the extraspace before the assignment operator considers it as: "%msBuilder % Changing from: "Set msBuilder =" to "Set msBuilder=" did the magic. Thank you everyone! – sm2mafaz Jan 08 '18 at 05:09
  • 1
    @Compo, since your comment help resolve sm2mafaz`s question, you can convert your comment to answer, so it could help other community members who get the same issues. – Leo Liu Jan 08 '18 at 05:39

0 Answers0