[转]How can I install the VS2017 version of msbuild on a build server without installing the IDE?
The Visual Studio Build tools are a different download than the IDE. They appear to be a pretty small subset.
- On the Visual Studio download page, expand Other Tools and Frameworks at the bottom of the page
- Download the Visual Studio build tools
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.
posted on 2017-04-12 09:58 freeliver54 阅读(400) 评论(2) 编辑 收藏 举报