如何下载Visual studio 2019离线安装程序

问题描述 投票:0回答:2

我要在我的电脑上安装 Visual Studio 2019 社区版(最新版本)。我在 google 中找到了链接,该链接具有在线安装程序(1376 KB)大小。我想下载 Visual Studio 2019 社区版的离线安装程序。请分享给我离线安装程序的下载链接

visual-studio-2019
2个回答
38
投票

Microsoft 不再提供离线安装程序,例如 Visual Studio 的

.ISO
图像 - 相反,他们有 说明 让您承担创建离线安装程序的负担。您需要使用
--layout
命令行参数,然后运行下载的安装程序。

  1. 下载并缓存离线文件:

    vs_community.exe --layout f:\vslayout.2019 --lang en-US
    
  2. 从缓存目录运行

    f:
    cd \vslayout.2019
    vs_community.exe --noWeb
    

注意: 更改驱动器

F
,以匹配系统上具有 MSVC 2019 约 35 GB 可用空间的驱动器。请参阅命令行参数的说明,以仅选择 C++、.NET 等选项。

您可以通过以下方式获取有关安装程序命令行参数的帮助:

vs_community --help

相关布局命令有:

command-line option     Description
--layout <dir>          Specifies a directory to create an offline install cache.
--lang <locales>        Used with --layout to prepare an offline install cache with resource packages with the specified language(s). See a full list of supported language-locales below.
--add <workload>        One or more workload or component IDs to add. The required components of the artifact are installed, but not the recommended or optional components. You can control additional components globally using --includeRecommended and/or --includeOptional. For finer-grained control, you can append ;includeRecommended or ;includeOptional to the ID (for example, --add Workload1;includeRecommended or --add Workload2;includeOptional).
                        Note: If --add is used, only the specified workloads and components and their dependencies are downloaded. If --add is not specified, all workloads and components are downloaded to the layout.
--includeRecommended    Includes the recommended components for any workloads that are installed, but not the optional components. The workloads are specified either with --allWorkloads or --add.
--includeOptional       Includes the recommended and optional components for any workloads being included in the layout. The workloads are specified with --add.
--keepLayoutVersion     Apply changes to the layout without updating the version of the layout.
--verify                Verify the contents of a layout. Any corrupt or missing files are listed.
--fix                   Verify the contents of a layout. If any files are found to be corrupt or missing, they are redownloaded. Internet access is required to fix a layout.
--clean <paths to catalogs>

0
投票

我开发了一个使用 VB.NET 动态生成批处理 (.bat) 脚本的应用程序,该脚本可用于下载 Visual Studio 2017、2019 和 2022。您可以使用应用程序中包含的控件自定义脚本并将其下载到有针对性的驱动。您可以在这里下载。

这是我对社区的贡献。

© www.soinside.com 2019 - 2024. All rights reserved.