Getting msbuild.exe without installing Visual Studio

后端 未结 3 1774
渐次进展
渐次进展 2020-12-23 18:41

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

相关标签:
3条回答
  • 2020-12-23 19:22

    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.

    0 讨论(0)
  • 2020-12-23 19:34

    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.

    0 讨论(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\\'))" 
    
    0 讨论(0)
提交回复
热议问题