如何在不安装IDE的情况下在生成服务器上安装msbuild的VS2017版本? [英] How can I install the VS2017 version of msbuild on a build server without installing the IDE?

查看:166
本文介绍了如何在不安装IDE的情况下在生成服务器上安装msbuild的VS2017版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从历史上看,这是通过 Microsoft Build Tools .但似乎构建这些工具可能不适用于2015年以后的版本.替换的对象似乎是Visual Studio构建工具,它似乎还没有真正的主页.

Historically, this has been done with the Microsoft Build Tools. But it seems that the Build Tools may not be available for versions after 2015. The replacement appears to be the Visual Studio build tools, which doesn't seem to have a real homepage yet.

我下载了 VS2017 Professional安装程序,并转到了单个组件 >标签.马上,摘要告诉我Visual Studio核心编辑器在那里,占用了753MB.我不要编辑只是msbuild.无法取消选择编辑器.

I downloaded the VS2017 Professional installer, and went to the Individual Components tab. Right away, the summary is telling me that the Visual Studio core editor is there, taking up 753MB. I don't want the editor. Just msbuild. There is no way to unselect the editor.

是否可以在不安装Visual Studio IDE的情况下安装最新版本的msbuild?

Is there a way I can install the latest version of msbuild without also installing the Visual Studio IDE?

推荐答案

Visual Studio Build工具的下载与IDE的下载不同.它们似乎只是一个很小的子集,它们被称为 Visual Studio 2019的构建工具(

The Visual Studio Build tools are a different download than the IDE. They appear to be a pretty small subset, and they're called Build Tools for Visual Studio 2019 (download).

您可以使用GUI进行安装,也可以编写msbuild安装脚本:

You can 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

  • Microsoft.Component.MSBuild
  • Microsoft.VisualStudio.Component.CoreBuildTools
  • Microsoft.VisualStudio.Component.Roslyn.Compiler
  • 您可以找到有关其他可用的CLI开关的文档此处.

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

    构建工具的安装比完整的IDE快很多.在我的测试中,花了5到10秒.使用--quiet时,除了短暂的光标更改外,没有进度指示器.如果安装成功,您应该可以在%programfiles(x86)%\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin中看到构建工具.

    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\2019\BuildTools\MSBuild\Current\Bin.

    如果在那里没有看到它们,请尝试在没有--quiet的情况下运行,以查看安装过程中可能发生的任何错误消息.

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

    这篇关于如何在不安装IDE的情况下在生成服务器上安装msbuild的VS2017版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆