100

How do you get msbuild.exe without installing those crazy Visual Studio programs?

I need it for an npm install to finish working. I'm on Windows 7 and can't get on older version of Visual Studio 2013 Express online.

3

4 Answers 4

158

The latest (as of Jan 2019) stand-alone MSBuild installers can be found here: https://www.visualstudio.com/downloads/

Scroll down to "Tools for Visual Studio 2019" and choose "Build Tools for Visual Studio 2019" (despite the name, it's for users who don't want the full IDE)

See this question for additional information.

Sign up to request clarification or add additional context in comments.

5 Comments

It took a while to find where MSBuild.exe was installed. By default, it is here: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin
See, for example, this question which goes into some detail about how to just install the Visual Studio 2017 Build Tools (and not the IDE too).
The tool is now listed under Tools for Visual Studio 2017 instead of the Other Tools and Framework section.
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin - is the location today
In Visual Studio 2022, the tool is installed in: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin
23

It used to be installed with the .NET framework. MsBuild v12.0 (2013) is now bundled as a stand-alone utility and has it's own installer.

http://www.microsoft.com/en-us/download/confirmation.aspx?id=40760

To reference the location of MsBuild.exe from within an MsBuild script, use the default $(MsBuildToolsPath) property.

2 Comments

but this version is obsolete (now). how do I get v15?
@Rigel I don't know if you specifically want VS2015's build tools, but this question goes into some detail about getting the 2017 tools.
5

You can also get the MSBuild executable as a Nuget package https://www.nuget.org/packages/Microsoft.Build.Runtime/.

Comments

0

Download MSBuild with the link from @Nicodemeus answer was OK, yet the installation was broken until I've added these keys into a register:

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild\ToolsVersions\12.0] "VCTargetsPath11"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath11)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V110\\'))" "VCTargetsPath"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V110\\'))" 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.