Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using 2013 msbuild in program with Project.Build

Our tests use Microsoft.Build.Evaluation.Project.Build to build projects.

Works fine for VS 2010 & 2012. Trouble is in VS 2013, it picks up msbuild from

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

ver 4.0.30319.18408

instead of from VS 2013

C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe

ver 12.0.21005.1

Is there any method to ask it to pick up the VS 2013 msbuild? May be adding to the .proj file or setting an environment value before calling the build method?

like image 278
dushyantp Avatar asked Nov 20 '13 13:11

dushyantp


1 Answers

MSBuild and its Toolset now Version with Visual Studio

We plan to evolve our build tools with each version of Visual Studio from now on. Each release of the Micrsoft® Build Tools will have a new version of MSBuild, the VB/C# Compilers, and Toolset. They will all version together. Visual Studio will use its corresponding version of MSBuild exclusively. For instance, Visual Studio 2013 will exclusively use MSBuild 2013 and ToolsVersion=”12.0”. To align with Visual Studio’s versioning we have updated MSBuild’s assembly version from 4.0 to 12.0 as well.

And a link to the visual studio team page, with a few additional defaults to check

http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx

however 4.0 and version 12 are the same; re-versioned to support the visual studio version number format

like image 73
Mike Beeler Avatar answered Sep 29 '22 01:09

Mike Beeler