为 UWP 开发创建 VS 2017 离线布局需要哪些组件? [英] What components I need to create VS 2017 offline layout for UWP development?

查看:27
本文介绍了为 UWP 开发创建 VS 2017 离线布局需要哪些组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以下载整个工作负载,但它解压了 12 GB 以上(因此可能需要 4 GB 或 5 GB 下载),而且我的连接需要几天时间,我不明白为什么还有许多其他组件我不知道需要包括用于 Xamarin、Web 和 ASP.NET 的 UWP 工具,我下载为 ISO 等的 Windows 10 SDK...

I know I could download the whole workload, but it's 12 GB+ decompressed (so maybe 4 or 5 GB download) and with my connection it would take several days and I don't understand why many other components which I don't need are included like UWP tools for Xamarin, Web and ASP.NET, Windows 10 SDK which I downloaded as ISO etc...

这样的事情可以吗?

vs_community.exe --layout D:\VS17 --lang en-US --add 
Microsoft.VisualStudio.Workload.Universal
Microsoft.VisualStudio.Component.UWP.Support
Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard
Microsoft.Net.Core.Component.SDK

有人试过类似的吗?我会为简单的 C# UWP 应用程序和 Unity UWP 项目编译获得更小的工作布局吗?

Has anyone tried something similar? Would I get a smaller working layout for simple C# UWP apps and Unity UWP project compile?

附言当然,考虑到我已经拥有托管桌面和本机桌面工作负载.

P.S. Of course considering I already have Managed Desktop and native desktop workloads.

推荐答案

要了解特定开发工作负载所需的组件/包,请参阅 Visual Studio Community 2017 工作负载和组件 ID.我在这里引用那篇文章的注释:

To know the required components/packages for a specific development workload, see Visual Studio Community 2017 workload and component IDs. Here I quote the notes from that article:

  • 每个工作负载都有自己的部分,后跟工作负载 ID 和可用于工作负载的组件表.
  • 默认情况下,安装工作负载时将安装必需的组件.如果您愿意,也可以安装推荐和可选组件.

对于 UWP 开发,工作负载 ID 为 Microsoft.VisualStudio.Workload.Universal.因此,使用以下命令下载工作负载布局:

For UWP development the workload ID is Microsoft.VisualStudio.Workload.Universal. So download the workload layout with command:

    vs_community.exe --layout C:\vs2017layout --add Microsoft.VisualStudio.Workload.Universal --includeRecommended --lang en-US

其他必需的组件(例如 Microsoft.Net.Core.Component.SDK)会随该工作负载自动下载,如前文所述.所以你不必在命令中提到这一点.对于其他开发环境,只需更改该命令中的 ID(在 --add 选项之后).例如:

And the other required components (e.g. Microsoft.Net.Core.Component.SDK) are downloaded automatically with that workload as mentioned in previous notes. So you don't have to mention that in command. For other development environment, only change the ID (after --add option) in that command. As example:

  • C#:Microsoft.VisualStudio.Workload.ManagedDesktop
  • C++:Microsoft.VisualStudio.Workload.NativeDesktop
  • Unity:Microsoft.VisualStudio.Workload.ManagedGame
  • Linux:Microsoft.VisualStudio.Workload.NativeCrossPlat

这篇关于为 UWP 开发创建 VS 2017 离线布局需要哪些组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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