Install msbuild 2017 w/o VS IDE

阅读更多

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.

你可能感兴趣的:(Install msbuild 2017 w/o VS IDE)