Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: VS setup layout creation for offline install does not works in the sandbox. #54

Open
Naheulf opened this issue Aug 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Naheulf
Copy link

Naheulf commented Aug 12, 2024

Windows Sandbox version

I don't know where I can find that version number. If it matter, the ver command in the sandbox give this output: Microsoft Windows [version 10.0.19041.4651]

Windows build number

Microsoft Windows [version 10.0.19045.4651]

Other software

Visual studio community installer bootstrap (but also fail with other variants), See STR below for direct link.

Steps to reproduce the bug

  1. Open Windows SandBox (you can use the default options)
  2. Create a folder for the layout (“C:\VS” in my case but the exact name doesn’t matter, only ensure a short pathname)
  3. Download vs_community.exe from https://learn.microsoft.com/en-us/visualstudio/install/create-a-network-installation-of-visual-studio?view=vs-2022 and place it in the folder created in the previous step.
  4. Run cmd.exe as administrator and change the current directory to the folder for the layout create at step 2 (so “C:\VS” in my case)
  5. Try to create a layout. All my attempts fail. But the command line I used for the logs in the attached vslogs.zip is vs_Community.exe --wait --layout c:\VS --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Component.Git --lang en-US fr-FR. (Note: only the --layout C:\VS part is really needed.)

Expected result

Should create a layout and download all the listed components.

Actual result

The GUI only show the download of the installer and close, leaving no extra process in the task manager.
In the chosen layout folder, it creates only four files:

  • .\vs_installer.version.json ← Remember this one
  • .\certificates\manifestCounterSignRootCertificate.cer
  • .\certificates\manifestRootCertificate.cer
  • .\certificates\vs_installer_opc.RootCertificate.cer

Notes:

  • The "normal" install DOES works
  • The layout usage (if created outside of the sandbox) does also works.
  • The layout creation does works in a Hyper-V VM. So the issue does not came from Hyper-V

Log’s files analyse

If I dig in the log’s files, I found that part in in the dd_bootstrapper_* files:

[16b0:0004][2024-08-08T19:04:11] Existing client is unsupported: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe does not exist.
[16b0:0004][2024-08-08T19:04:11] Trying to read c:\VS\Layout.json and UseLatestInstaller value.
[16b0:0004][2024-08-08T19:04:11] Beginning file download. File = https://aka.ms/vs/17/release/installer.
[16b0:0012][2024-08-08T19:04:11] Download requested: https://download.visualstudio.microsoft.com/download/pr/11917f82-1030-4dda-a768-f0da3c4623a9/8FEE87AACBF2AFF21A05ECE2003A3CEAB0578DE79076863405693B67B2AD88FE/vs_installer.opc
[16b0:0013][2024-08-08T19:04:11] Attempting download 'https://download.visualstudio.microsoft.com/download/pr/11917f82-1030-4dda-a768-f0da3c4623a9/8FEE87AACBF2AFF21A05ECE2003A3CEAB0578DE79076863405693B67B2AD88FE/vs_installer.opc' using engine 'WebClient'
[16b0:0013][2024-08-08T19:04:45] Package signature verification returned Success for path: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\aqnfhg4.rwm\vs_installer.opc
[16b0:0013][2024-08-08T19:04:45] Download of 'https://download.visualstudio.microsoft.com/download/pr/11917f82-1030-4dda-a768-f0da3c4623a9/8FEE87AACBF2AFF21A05ECE2003A3CEAB0578DE79076863405693B67B2AD88FE/vs_installer.opc' succeeded using engine 'WebClient'
[16b0:0004][2024-08-08T19:04:45] Saving Certificates to layout folder
[16b0:0004][2024-08-08T19:04:47] Package signature verification returned Success for path: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\aqnfhg4.rwm\vs_installer.opc
[16b0:0004][2024-08-08T19:04:47] Beginning extracting files to C:\Users\WDAGUtilityAccount\AppData\Local\Temp\wwkdkzw.wlw.
[16b0:0004][2024-08-08T19:04:47] Extracting 'C:\Users\WDAGUtilityAccount\AppData\Local\Temp\aqnfhg4.rwm\vs_installer.opc' to 'C:\Users\WDAGUtilityAccount\AppData\Local\Temp\wwkdkzw.wlw'.
[16b0:0004][2024-08-08T19:04:48] Successfully extracted 'C:\Users\WDAGUtilityAccount\AppData\Local\Temp\wwkdkzw.wlw'.
[16b0:0004][2024-08-08T19:04:48] Starting VS setup process 'setup.exe' with arguments ' layout --bootstrapperPath "c:\VS\vs_Community.exe" --layout "c:\VS" --in "C:\Users\WDAGUtilityAccount\AppData\Local\Temp\36a86474b4e6cf25406675cc3e8527\vs_bootstrapper_d15\vs_setup_bootstrapper.json" --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Component.Git --lang en-US fr-FR --locale fr-FR --activityId "1720b711-4de4-4896-8640-acadf2719d9a" --InstallerPath "C:\Users\WDAGUtilityAccount\AppData\Local\Temp\aqnfhg4.rwm\vs_installer.opc"'.
[16b0:0004][2024-08-08T19:04:48] Warning: Failed to parse the json file since it does not exists: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\wwkdkzw.wlw\resources\app\layout\vs_installer.version.json
[16b0:0004][2024-08-08T19:04:48] VS setup process C:\Users\WDAGUtilityAccount\AppData\Local\Temp\wwkdkzw.wlw\resources\app\layout\setup.exe started. All done.
[16b0:0004][2024-08-08T19:04:48] Waiting for setup process to complete...
[16b0:0004][2024-08-08T19:05:19] VS setup process exited with code -532462766
[16b0:0004][2024-08-08T19:05:20] Bootstrapper failed with client process error or unknown error.
  

Note: the -532462766 exit code is also returned as %ErrorLevel% by the installer bootstrap (vs_community.exe).

The bootstrap seems to download vs_installer.opc, extract it in a random temporary path and run the setup.exe from the extracted .\ resources\app\layout path. Then the setup.exe seem to expect a vs_installer.version.json in the current folder, but that file is in the layout folder (C:\VS\vs_installer.version.json)

Included System Information

No response

@Naheulf Naheulf added the bug Something isn't working label Aug 12, 2024
@Naheulf
Copy link
Author

Naheulf commented Aug 12, 2024

I first think it was a bug from the VS installer so I created an issue on them forum. But that does not seem the case.

Any ways, here is the link to that issue: https://developercommunity.visualstudio.com/t/Bootstrapper-fail-to-create-offline-layo/10718807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant