Creating offline install of VS 2019 - Error: setup completed with errors

Creating offline install of VS 2019 - Error: setup completed with errors

我在命令提示符下 运行 创建了 visual studio 2019 的离线安装程序:

vs_professional__1876696149.1540495961.exe --layout c:\vslayout --lang en-US

在C:\vslayout下下载了很多包,得到如下:


更新:

这是我在 %temp% 中找到的日志文件:

  1. dd_vs_professional__1876696149.1540495961_decompression_log.txt
[10/14/2019, 6:47:8] === Logging started: 2019/10/14 06:47:08 ===
[10/14/2019, 6:47:8] Executable: D:\Visual Studio\VS2019\vs_professional__1876696149.1540495961.exe v16.3.29409.12
[10/14/2019, 6:47:8] --- logging level: standard ---
[10/14/2019, 6:47:8] Directory 'C:\Users\Youssef\AppData\Local\Tempcaeed138aaec98df15a696071\' has been selected for file extraction
[10/14/2019, 6:47:8] Extracting files to: C:\Users\Youssef\AppData\Local\Tempcaeed138aaec98df15a696071\
[10/14/2019, 6:47:9] Extraction took 625 milliseconds
[10/14/2019, 6:47:9] Executing extracted package: 'vs_bootstrapper_d15\vs_setup_bootstrapper.exe ' with commandline '  --layout c:\vslayout --lang en-US --env "_SFX_CAB_EXE_PACKAGE:D:\Visual Studio\VS2019\vs_professional__1876696149.1540495961.exe _SFX_CAB_EXE_ORIGINALWORKINGDIR:D:\Visual Studio\VS2019"'
[10/14/2019, 11:12:56] The entire Box execution exiting with result code: 0x0
[10/14/2019, 11:12:56] Launched extracted application exiting with result code: 0x643
[10/14/2019, 11:12:56] === Logging stopped: 2019/10/14 11:12:56 ===
  1. dd_bootstrapper_20191014064710.log
Beginning of the log. Start Time: 14/10/2019 6:47:10 AM
VisualStudio Bootstrapper:14/10/2019 6:47:11 AM: Commandline arguments = --layout,c:\vslayout,--lang,en-US,--env,_SFX_CAB_EXE_PACKAGE:D:\Visual Studio\VS2019\vs_professional__1876696149.1540495961.exe _SFX_CAB_EXE_ORIGINALWORKINGDIR:D:\Visual Studio\VS2019
VisualStudio Bootstrapper:14/10/2019 6:47:11 AM: Parent process name = vs_professional__1876696149.1540495961
VisualStudio Bootstrapper:14/10/2019 6:47:11 AM: Parent process product version = 16.3.29409.12
VisualStudio Bootstrapper:14/10/2019 6:47:11 AM: CampaignId = 1876696149.1540495961
VisualStudio Bootstrapper:14/10/2019 6:47:11 AM: ResponseId not available in 'vs_setup_bootstrapper.config'. Trying to parse filename.
VisualStudio Bootstrapper:14/10/2019 6:47:11 AM: loading config settings: -update --update --layout -offline --offline --locale --layout --originalworkingdir --installLayoutPath --env
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: DownloadURL = https://aka.ms/vs/16/release/installer
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: InstallLocation = C:\Program Files (x86)\Microsoft Visual Studio\Installer
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: OfflineFilePath = 
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: LayoutLocation = c:\vslayout
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: ExecutableArguments =  layout --bootstrapperPath "D:\Visual Studio\VS2019\vs_professional__1876696149.1540495961.exe" --layout "c:\vslayout" --in "C:\Users\Youssef\AppData\Local\Tempcaeed138aaec98df15a696071\vs_bootstrapper_d15\vs_setup_bootstrapper.json" --lang en-US --locale en-US --activityId "c0b5d7f0-d310-434d-93e0-e7af9bdf413a" --campaign "1876696149.1540495961"
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: OSVersion = Microsoft Windows NT 10.0.17763.0
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: Starting to detect the existing VS and .NET...
VisualStudio Bootstrapper:14/10/2019 6:47:14 AM: Finished detecting the existing VS and .Net
VisualStudio Bootstrapper:14/10/2019 6:47:16 AM: Beginning file download. File = https://aka.ms/vs/16/release/installer.
VisualStudio Bootstrapper:14/10/2019 6:47:16 AM: Download requested: https://aka.ms/vs/16/release/installer
VisualStudio Bootstrapper:14/10/2019 6:47:16 AM: Attempting download 'https://aka.ms/vs/16/release/installer' using engine 'WebClient'
VisualStudio Bootstrapper:14/10/2019 6:47:17 AM: Uri 'https://aka.ms/vs/16/release/installer' redirected to 'https://download.visualstudio.microsoft.com/download/pr/a47114c0-04c1-4168-a293-58b5e07f1a37/6938CB4AD9DE9623B1AE8DE71EEF98090D3BCBDE4FB9CB373C558BA253B819BE/vs_installer.opc'
VisualStudio Bootstrapper:14/10/2019 6:48:49 AM: Package signature verification returned Success for path: C:\Users\Youssef\AppData\Local\Temp\lg0nqo4.n0n\vs_installer.opc
VisualStudio Bootstrapper:14/10/2019 6:48:49 AM: Download of 'https://aka.ms/vs/16/release/installer' succeeded using engine 'WebClient'
VisualStudio Bootstrapper:14/10/2019 6:48:49 AM: Saving Certificates to layout folder
VisualStudio Bootstrapper:14/10/2019 6:49:03 AM: Package signature verification returned Success for path: C:\Users\Youssef\AppData\Local\Temp\lg0nqo4.n0n\vs_installer.opc
VisualStudio Bootstrapper:14/10/2019 6:49:11 AM: Beginning extracting files to C:\Users\Youssef\AppData\Local\Temp[=12=]iliouk.fjp.
VisualStudio Bootstrapper:14/10/2019 6:49:11 AM: Extracting 'C:\Users\Youssef\AppData\Local\Temp\lg0nqo4.n0n\vs_installer.opc' to 'C:\Users\Youssef\AppData\Local\Temp[=12=]iliouk.fjp'.
VisualStudio Bootstrapper:14/10/2019 6:49:22 AM: Successfully extracted 'C:\Users\Youssef\AppData\Local\Temp[=12=]iliouk.fjp'.
VisualStudio Bootstrapper:14/10/2019 6:49:22 AM: Starting VS setup process 'setup.exe' with arguments ' layout --bootstrapperPath "D:\Visual Studio\VS2019\vs_professional__1876696149.1540495961.exe" --layout "c:\vslayout" --in "C:\Users\Youssef\AppData\Local\Tempcaeed138aaec98df15a696071\vs_bootstrapper_d15\vs_setup_bootstrapper.json" --lang en-US --locale en-US --activityId "c0b5d7f0-d310-434d-93e0-e7af9bdf413a" --campaign "1876696149.1540495961" --InstallerPath "C:\Users\Youssef\AppData\Local\Temp\lg0nqo4.n0n\vs_installer.opc"'.
VisualStudio Bootstrapper:14/10/2019 6:49:22 AM: Failed to parse the json file since it does not exists: C:\Users\Youssef\AppData\Local\Temp[=12=]iliouk.fjp\resources\app\layout\vs_installer.version.json
VisualStudio Bootstrapper:14/10/2019 6:49:22 AM: VS setup process C:\Users\Youssef\AppData\Local\Temp[=12=]iliouk.fjp\resources\app\layout\setup.exe started. All done.
VisualStudio Bootstrapper:14/10/2019 6:49:22 AM: Waiting for setup process to complete...
VisualStudio Bootstrapper:14/10/2019 11:12:47 AM: VS setup process exited with code 1603
VisualStudio Bootstrapper:14/10/2019 11:12:49 AM: Bootstrapper failed with client process error or unknown error.
  1. dd_setup_20191014064938.log

此文件非常大,直接放在这里 (9MB),从 here 下载 ZIP 文件。

  1. dd_setup_20191014064938_errors.log
[14d0:007e][2019-10-14T09:28:14] Package 'AndroidImage_ARM_API25,version=21.0.0.3' failed to download from 'https://go.microsoft.com/fwlink/?linkid=859024'. WebClient download failed: The operation has timed out. Bits download failed: File not found.. WinInet download failed: Function: InternetOpenUrl, HR: -2147012894, Message: Unknown error 12002, Signature: PackageId=AndroidImage_ARM_API25;PackageAction=DownloadPackage;ReturnCode=0x80131500
[14d0:0087][2019-10-14T09:30:12] Package 'AndroidPlatform25.Private,version=3.0.0.3' failed to download from 'https://go.microsoft.com/fwlink/?linkid=853811'. WebClient download failed: The operation has timed out. Bits download failed: File not found.. WinInet download failed: Function: InternetOpenUrl, HR: -2147012894, Message: Unknown error 12002, Signature: PackageId=AndroidPlatform25.Private;PackageAction=DownloadPackage;ReturnCode=0x80131500
[14d0:002e][2019-10-14T09:38:08] Package 'AndroidNDK_R16B,version=16.0,chip=x86' failed to download from 'https://go.microsoft.com/fwlink/?linkid=2026158'. WebClient download failed: The operation has timed out. Bits download failed: File not found.. WinInet download failed: Function: InternetOpenUrl, HR: -2147012894, Message: Unknown error 12002, Signature: PackageId=AndroidNDK_R16B;PackageAction=DownloadPackage;ReturnCode=0x80131500
  1. dd_bootstrapper_20191014064043.log
Beginning of the log. Start Time: 14/10/2019 6:40:43 AM
VisualStudio Bootstrapper:14/10/2019 6:40:46 AM: Commandline arguments = --env,_SFX_CAB_EXE_PACKAGE:C:\Users\Youssef\Downloads\vs_professional__1876696149.1540495961.exe _SFX_CAB_EXE_ORIGINALWORKINGDIR:C:\Users\Youssef\Downloads
VisualStudio Bootstrapper:14/10/2019 6:40:46 AM: Parent process name = vs_professional__1876696149.1540495961
VisualStudio Bootstrapper:14/10/2019 6:40:46 AM: Parent process product version = 16.3.29409.12
VisualStudio Bootstrapper:14/10/2019 6:40:46 AM: CampaignId = 1876696149.1540495961
VisualStudio Bootstrapper:14/10/2019 6:40:46 AM: ResponseId not available in 'vs_setup_bootstrapper.config'. Trying to parse filename.
VisualStudio Bootstrapper:14/10/2019 6:40:46 AM: loading config settings: -update --update --layout -offline --offline --locale --layout --originalworkingdir --installLayoutPath --env
VisualStudio Bootstrapper:14/10/2019 6:41:00 AM: DownloadURL = https://aka.ms/vs/16/release/installer
VisualStudio Bootstrapper:14/10/2019 6:41:00 AM: InstallLocation = C:\Program Files (x86)\Microsoft Visual Studio\Installer
VisualStudio Bootstrapper:14/10/2019 6:41:00 AM: OfflineFilePath = 
VisualStudio Bootstrapper:14/10/2019 6:41:00 AM: LayoutLocation = 
VisualStudio Bootstrapper:14/10/2019 6:41:00 AM: ExecutableArguments = /finalizeInstall install --in "C:\ProgramData\Microsoft\VisualStudio\Packages\_bootstrapper\vs_setup_bootstrapper_201910140640463892.json" --locale en-US --activityId "df5c7a78-9216-433e-9116-cdc2dd6312b7" --campaign "1876696149.1540495961"
VisualStudio Bootstrapper:14/10/2019 6:41:00 AM: OSVersion = Microsoft Windows NT 10.0.17763.0
VisualStudio Bootstrapper:14/10/2019 6:41:00 AM: Starting to detect the existing VS and .NET...
VisualStudio Bootstrapper:14/10/2019 6:41:01 AM: Finished detecting the existing VS and .Net

检查错误日志(它们保存在 %temp% 中),如果错误是暂时的(例如网络问题),则重新 运行 命令构建离线安装程序。

这将逐步验证和更新离线安装程序。

我遇到了完全相同的问题。检查 %TEMP% 中记录的日志后,我也有以下错误 -

VS setup process exited with code 1006

解决方案是下载 VS_Enterprise.exe 引导程序的更新版本。这已经解决了我的问题。