Allow me to pick which msbuild I want to run

chris's Avatar


21 Feb, 2014 06:38 PM

This is specifically important with VS 2013 and MSBuild 12.0. If I have a VS 2013 project and you build it with MSBuild 4.0 it can create problems when trying to location targets.

  1. Support Staff 1 Posted by Feodor Fitsner on 21 Feb, 2014 07:16 PM

    Feodor Fitsner's Avatar

    OK, I could envision the following implementation:

    1. We'd leave PATH set to C:\Windows\Microsoft.NET\Framework\v4.0.30319 (as of now), so if you have just msbuild.exe in your scripts it calls MSBuild 4.0.
    2. On "Build" tab of project settings add Visual Studio version dropdown with three values:
      • Auto
      • Visual Studio 2013
      • Visual Studio 2012 and below

    Auto option will be analyzing .sln file (if specified) to determine VS version. If .sln file is not provided it falls back to msbuild in PATH. Second option will do explicit call to C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild.exe.
    Third option will call msbuild.exe which is in PATH.

    What do you think?

  2. 2 Posted by chris on 21 Feb, 2014 07:23 PM

    chris's Avatar

    Generally that sounds like a good plan.

    Given that you already search for the solution and you load it or at least parse it to analyze the list of projects I don't see why you couldn't analyze the solution if you find it? Why would you only try the analysis under the Auto option if I explicitly specify a solution?

  3. Support Staff 3 Posted by Feodor Fitsner on 21 Feb, 2014 08:13 PM

    Feodor Fitsner's Avatar

    Well, you are right! :)

    Indeed, if AppVeyor found .sln (or it was specified) it calls MSBuild 12.0 if it's VS 2013. In all other cases it calls MSBuild which is in PATH.

    Cool, I'm adding a new TODO item. Thanks!

    Btw, give a try to Azure Cloud Service deployment when you have a chance.

  4. Support Staff 4 Posted by Feodor Fitsner on 22 Feb, 2014 02:39 AM

    Feodor Fitsner's Avatar


    It's been deployed. Now if it's VS 2013 solution AppVeyor runs MSBuild 12.0.

    Thank you! Let me know if you find anything else.

  5. 5 Posted by chris on 22 Feb, 2014 02:53 AM

    chris's Avatar

    Awesome, thanks. You have a very interesting service here.

    Sent from my Windows Phone

  6. Support Staff 6 Posted by Feodor Fitsner on 22 Feb, 2014 03:56 AM

    Feodor Fitsner's Avatar

    Glad you like it!

  7. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:38 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac