如何使用指定的配置文件从命令行vs2019 for C ++?

PutBere

我知道我可以通过检查GUI交互中的选项来安装vs2019。实际上,我以这种方式设置了一个盒子。我正在尝试另一种方式。

在此处输入图片说明

Per ms doc我可以从命令行完成这项工作。

vs_enterprise.exe --installPath C:\minVS ^
--add Microsoft.VisualStudio.Workload.CoreEditor ^
--passive --norestart

上面的命令将安装Visual Studio的最小实例,没有交互式提示,但显示进度。

如何使用此方法从命令行使用指定的配置文件安装vs2019 for C ++?

{
  "version": "1.0",
  "components": [
    "Microsoft.VisualStudio.Component.CoreEditor",
    "Microsoft.VisualStudio.Workload.CoreEditor",
    "Microsoft.VisualStudio.Component.NuGet",
    "Microsoft.VisualStudio.Component.Roslyn.Compiler",
    "Microsoft.Component.MSBuild",
    "Microsoft.VisualStudio.Component.TextTemplating",
    "Microsoft.VisualStudio.Component.IntelliCode",
    "Component.Microsoft.VisualStudio.LiveShare",
    "Microsoft.VisualStudio.Component.VC.CoreIde",
    "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
    "Microsoft.VisualStudio.Component.Graphics.Tools",
    "Microsoft.VisualStudio.Component.VC.DiagnosticTools",
    "Microsoft.VisualStudio.Component.Debugger.JustInTime",
    "Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
    "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
    "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake",
    "Microsoft.VisualStudio.Component.VC.CMake.Project",
    "Microsoft.VisualStudio.Component.VC.ATL",
    "Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest",
    "Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest",
    "Microsoft.VisualStudio.Component.VC.ASAN",
    "Microsoft.VisualStudio.Workload.NativeDesktop"
  ]
}

此配置文件是从vs2019引导程序导出的。

dxiv

可以使用命令行选项安装或添加以前保存的.vsconfig 安装配置--config使用--config示例中:

  • 使用--config安装从以前保存的安装配置文件的工作量和组件:

    vs_enterprise.exe --config "C:\.vsconfig" --installPath "C:\VS"
    
  • 使用--config工作负载和组件添加到现有的安装:

    vs_enterprise.exe modify --installPath "C:\VS" --config "C:\.vsconfig"
    

博客文章使用.vsconfig在整个组织中配置Visual Studio包含有关.vsconfig文件的更多信息,包括如何将文件与单个解决方案相关联。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何从命令行运行.c文件

如何在Mac上使用Mono通过NUnit测试从命令行编译和运行C#文件

从命令行C ++获取文件作为输入

从命令行编译.m Objective-C文件

如何使用 perl(自动化)从命令行读取配置文件

如何从命令行(MSBuild)使用C#7代码构建.csproj

如何从命令行使用msbuild编译我的C#解决方案

从命令行停用Maven配置文件

从命令行到 libreoffice 配置文件的路径

如何在命令行中使用指定的配置文件在OSX中启动新的终端?

如何使用指定的弹簧配置文件运行maven命令行?

如何使用命令行编辑配置文件?

如何使用SonarQube服务器上的质量配置文件从命令行本地运行代码分析?

如何从命令行激活Maven配置文件(以构建子系统)

如何从命令行在Windows 10中重置或清除用户配置文件?

从命令行使用不同的配置文件打开新的 Chrome 窗口

使用gcc命令行从.c文件构建.so文件

Vim:从命令行以指定配置打开多个文件

C ++如何通过命令行参数读取txt文件

如何在2019年通过命令行使用正确的配置文件构建Xcode项目?

如何在C ++中从命令行获取CGI表单数据

无论如何要从命令行获取C程序的返回值?

如何使用命令行将单个C#类文件编译为.exe?

如何使用命令行在文件中用'/'替换'&#x5c'?

如何使用来自命令行的输入文件在 linux 上运行 C 代码?

使用nmake或批处理脚本之类的其他工具从命令行编译C ++

C - 使用多线程编程从命令行计算统计值

从命令行使用 sizeof 编译 C 代码时出错

使用C ++从命令行运行带有参数的exe