What components I need to create VS 2017 offline l

2019-07-13 15:52发布

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...

So would something like this be OK?

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

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.

1条回答
再贱就再见
2楼-- · 2019-07-13 16:42

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:

  • Each workload has its own section, followed by the workload ID and a table of the components that are available for the workload.
  • By default, the Required components will be installed when you install the workload. If you choose to, you can also install the Recommended and Optional components.

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

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
查看更多
登录 后发表回答