您的位置:首页 > 其它

离线安装VS2017官方参考文档

2018-03-09 20:12 489 查看

Install Visual Studio 2017 on low bandwidth or unreliable network environments

Step 1 - Download the Visual Studio bootstrapper

Start by downloading the Visual Studio bootstrapper for your chosen edition of Visual Studio.
Your setup file—or to be more specific, a bootstrapper file—will match or be similar to one of the following.
EditionFile
Visual Studio Communityvs_community.exe
Visual Studio Professionalvs_professional.exe
Visual Studio Enterprisevs_enterprise.exe

Step 2 - Create a local install cache

You must have an internet connection to complete this step. To create a local layout, open a command prompt and use one of the commands from the following examples: The examples here assume that you're using the Community edition of Visual Studio; adjust the command as appropriate for your edition.
For .NET web and .NET desktop development, run:
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US


For .NET desktop and Office development, run:
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Office --includeOptional --lang en-US


For C++ desktop development, run:
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US


To create a complete local layout with all features (this will take a long time—we have lots of features!), run:
vs_community.exe --layout c:\vs2017layout --lang en-US


If you want to install a language other than English, change
en-US
to a locale from the list at the bottom of this page. Use this list of the components and workloads available to further customize your installation cache as necessary.
Important
A complete Visual Studio 2017 layout requires at least 35 GB of disk space and can take some time to download. See Use command-line parameters to install Visual Studio 2017 for information on how to create a layout with only the components you want to install.

Step 3 - Install Visual Studio from the local cache

Tip
When you run from a local install cache, setup uses the local versions of each of these files. But if you select components during installation that aren't in the cache, we attempt to download them from the internet.
To ensure that you only install the files you've downloaded, use the same command-line options that you used to create the layout cache. For example, if you created a layout cache with the following command:
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US

Use this command to run the installation:
c:\vs2017layout\vs_community.exe --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional

---------------------------------------------------------------------------------------------

简体中文:

--lang [code=plain]zh-CN
[/code]
[/code]

查看需要下载的模块的ID:

Visual Studio 2017 workload and component IDs

---------------------------------------
下载VC++,MFC模块:
d:\Downloads\vs_Community.exe --layout f:\vs2017layout --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --add Microsoft.VisualStudio.Component.VC.ATLMFC --lang zh-CN安装:vs_Community.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --add Microsoft.VisualStudio.Component.VC.ATLMFC
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: