欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Install msbuild 2017 w/o VS IDE

程序员文章站 2022-06-01 14:26:50
...

The Visual Studio Build tools are a different download than the IDE. They appear to be a pretty small subset.

  1. On the Visual Studio download page, expand Other Tools and Frameworks at the bottom of the page
  2. Download the Build Tools for Visual Studio 2017

You can then use the GUI to do the installation, or you can script the installation of msbuild:

vs_buildtools.exe --add Microsoft.VisualStudio.Workload.MSBuildTools --quiet

Microsoft.VisualStudio.Workload.MSBuildTools is a "wrapper" ID for the three subcomponents you need:

  • Microsoft.Component.MSBuild
  • Microsoft.VisualStudio.Component.CoreBuildTools
  • Microsoft.VisualStudio.Component.Roslyn.Compiler

You can find documentation about the other available CLI switches here.

The build tools installation is much quicker than the full IDE. In my test, it took 5-10 seconds. With --quiet there is no progress indicator other than a brief cursor change. If the installation was successful, you should be able to see the build tools in %programfiles(x86)%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin.

If you don't see them there, try running without --quiet to see any error messages that may occur during installation.