如何创建 VisualStudio2022
离线包,并在未连接互联网的 电脑
上安装;
一、下载 Visual Studio 2022 引导程序
下载 Enterprise 企业版引导程序[1].
1)将下载的引导程序放到一个新建的文件夹中如下:
E:\VisualStudio2022\
2)打开 cmd
进入到 vs_Enterprise.exe
所在目录
3)使用 cmd
下载 .NET 桌面开发
依赖项
vs_Enterprise.exe --layout E:\VisualStudio2022 --add Microsoft.VisualStudio.Workload.ManagedDesktop --includeRecommended --lang en-US zh-CN
参数解释
--layout
:指定 VS2022
相关组件的下载目录;
--add
:添加将要下载的工作负载,比如指定添加 ManagedDesktop
;
--includeRecommended
:安装相关工作负载的推荐组件;
--lang
:下载指定的语言包:英文(en-US)
、中文(zh-CN)
;
如需安装全量命令如下:
vs_Enterprise.exe --layout E:\VisualStudio2022 --all
工作负载集
工作负载 | 对应ID |
---|---|
Visual Studio 核心编辑器(Visual Studio Enterprise 2022 随附) | Microsoft.VisualStudio.Workload.CoreEditor |
Azure 开发 | Microsoft.VisualStudio.Workload.Azure |
数据存储和处理 | Microsoft.VisualStudio.Workload.Data |
数据科学和分析应用程序 | Microsoft.VisualStudio.Workload.DataScience |
.NET 桌面开发 | Microsoft.VisualStudio.Workload.ManagedDesktop |
使用 Unity 的游戏开发 | Microsoft.VisualStudio.Workload.ManagedGame |
使用 C++ 进行 Linux 和嵌入式开发 | Microsoft.VisualStudio.Workload.NativeCrossPlat |
使用 C++ 的桌面开发 | Microsoft.VisualStudio.Workload.NativeDesktop |
使用 C++ 的游戏开发 | Microsoft.VisualStudio.Workload.NativeGame |
使用 C++ 的移动开发 | Microsoft.VisualStudio.Workload.NativeMobile |
.NET Multi-Platform App UI 开发 | Microsoft.VisualStudio.Workload.NetCrossPlat |
ASP.NET 和 Web 开发 | Microsoft.VisualStudio.Workload.NetWeb |
Node.js 开发 | Microsoft.VisualStudio.Workload.Node |
Office/SharePoint 开发 | Microsoft.VisualStudio.Workload.Office |
Python 开发 | Microsoft.VisualStudio.Workload.Python |
通用 Windows 平台开发 | Microsoft.VisualStudio.Workload.Universal |
Visual Studio 扩展开发 | Microsoft.VisualStudio.Workload.VisualStudioExtension |