Visual Studio构建工具2019离线网络布局 - 布局缓存中缺少的软件包

发布于 2025-01-23 04:24:22 字数 2285 浏览 0 评论 0原文

我正在尝试使用以下命令来创建最新Visual Studio 2019构建工具组件(v16.11.12)选择的网络布局:

vs_BuildTools.exe --layout .\ --add Microsoft.VisualStudio.Workload.AzureBuildTools --add Microsoft.VisualStudio.Workload.DataBuildTools --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.NetCoreBuildTools --add Microsoft.VisualStudio.Workload.NodeBuildTools --add Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools --add Microsoft.VisualStudio.Workload.WebBuildTools --includeRecommended --lang en-US

此下载相关软件包按预期下载,因此接下来希望使用响应来测试安装。带有以下命令的文件:

vs_setup.exe --wait --noUpdateInstaller --noWeb --in CustomInstall.json

customInstall.json内容:

{
  "installChannelUri": ".\\ChannelManifest.json",
  "channelUri": "https://aka.ms/vs/16/release/channel",
  "installCatalogUri": ".\\Catalog.json",
  "channelId": "VisualStudio.16.Release",
  "productId": "Microsoft.VisualStudio.Product.BuildTools",

  "includeRecommended": true,
  "quiet": true,
  "norestart": true,
  
  "addProductLang": [
    "en-US"
    ],

    "add": [
        "Microsoft.VisualStudio.Workload.AzureBuildTools",
        "Microsoft.VisualStudio.Workload.DataBuildTools",
        "Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools",
        "Microsoft.VisualStudio.Workload.MSBuildTools",
        "Microsoft.VisualStudio.Workload.NetCoreBuildTools",
        "Microsoft.VisualStudio.Workload.NodeBuildTools",
        "Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools",
        "Microsoft.VisualStudio.Workload.WebBuildTools",
    ]
}

问题是预检查验证失败了消息

“预检查验证:布局缓存中缺少以下所需软件包”

此消息之后是大量的软件包,但如果需要这些软件包,但是,如果需要这些软件包,我希望最初的布局命令包括这些!建议是运行Fix命令:

vs_setup.exe --layout  C:\Temp\2019BuildTools_16_11_11 --fix

但是,这只是说一切都很好。

即使在另一个目录中再次运行布局命令,但是这次下载所有软件包都没有提供所说的内容,因此安装人员为何要寻找不包含在完整安装的一部分的软件包感到有些困惑例如,错误日志说'Microsoft.net.core.core.bootstrapperpackages,版本= 5.0.0.45'丢失,但仅'Microsoft.net.core.bootstrapperpackages,版本= 5.0.0.47'可用。

我最初在错误的论坛上创建了这篇文章,但是我认为我已经解决了它,因为我的customInstall.json文件中存在“ installoptional”参数,但在“布局命令”中不存在,但是看起来它在删除后仍无法使用。

我想念什么吗?

I'm attempting to create a network layout of a selection of the latest Visual Studio 2019 Build Tools components (v16.11.12) using the following command:

vs_BuildTools.exe --layout .\ --add Microsoft.VisualStudio.Workload.AzureBuildTools --add Microsoft.VisualStudio.Workload.DataBuildTools --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.NetCoreBuildTools --add Microsoft.VisualStudio.Workload.NodeBuildTools --add Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools --add Microsoft.VisualStudio.Workload.WebBuildTools --includeRecommended --lang en-US

This downloads the relevant packages as expected so next want to test the installation using the Response.json file with the following command:

vs_setup.exe --wait --noUpdateInstaller --noWeb --in CustomInstall.json

CustomInstall.json contents:

{
  "installChannelUri": ".\\ChannelManifest.json",
  "channelUri": "https://aka.ms/vs/16/release/channel",
  "installCatalogUri": ".\\Catalog.json",
  "channelId": "VisualStudio.16.Release",
  "productId": "Microsoft.VisualStudio.Product.BuildTools",

  "includeRecommended": true,
  "quiet": true,
  "norestart": true,
  
  "addProductLang": [
    "en-US"
    ],

    "add": [
        "Microsoft.VisualStudio.Workload.AzureBuildTools",
        "Microsoft.VisualStudio.Workload.DataBuildTools",
        "Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools",
        "Microsoft.VisualStudio.Workload.MSBuildTools",
        "Microsoft.VisualStudio.Workload.NetCoreBuildTools",
        "Microsoft.VisualStudio.Workload.NodeBuildTools",
        "Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools",
        "Microsoft.VisualStudio.Workload.WebBuildTools",
    ]
}

The problem is that the pre-check verification fails with the message

"Pre-check verification: The following required packages are missing from the layout cache"

This message is followed by a large swathe of packages that are indeed missing, but if these are required, I'd expect the initial layout command to include these! The suggestion is to run the fix command:

vs_setup.exe --layout  C:\Temp\2019BuildTools_16_11_11 --fix

However, this just completes saying everything's fine.

Even running the layout command again in another directory, but this time downloading all packages doesn't provide what it says is missing so am a bit stumped as to why the installer is looking for packages that aren't included as part of the full install e.g. error log says 'Microsoft.Net.Core.BootstrapperPackages,version=5.0.0.45' is missing but only 'Microsoft.Net.Core.BootstrapperPackages,version=5.0.0.47' is available in the cache.

I initially created this post in the wrong forum but thought I'd solved it due to having the "installOptional" parameter present in my CustomInstall.json file but not in the layout command, however, looks like it's still not working after removing it.

Am I missing something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

并安 2025-01-30 04:24:22

对我而言,有效的是删除- Noweb参数。

我遵循此Miscrosoft Guide 并使用命令创建了一个布局。

vs_enterprise.exe --layout D:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Azure --lang en-US

稍后,当我尝试使用它安装它时,

D:\localVSlayout\vs_enterprise.exe --noWeb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Azure --includeOptional

我得到了此错误“布局缓存中缺少以下所需软件包”

有效的工作只是删除- Noweb从命令。

D:\localVSlayout\vs_enterprise.exe --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Azure --includeOptional

For me what worked was to remove the --noWeb argument.

I followed this Miscrosoft guide and created a layout with the command.

vs_enterprise.exe --layout D:\localVSlayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Azure --lang en-US

Later when I try to install it using,

D:\localVSlayout\vs_enterprise.exe --noWeb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Azure --includeOptional

I got this error "the following required packages are missing from the layout cache"

What worked was simply remove the --noWeb argument from the command.

D:\localVSlayout\vs_enterprise.exe --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Azure --includeOptional
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文