Reputation: 1075
We’re using a offline-layout for VS2022 Professional LTSC, 17.8.5 and it has been working until yesterday.
Hosts updating from an earlier verison using the switches
\\path-to-layout\\vs_professional.exe update --passive --norestart --wait --nocache --noWeb --installPath C:\\Program Files\\Microsoft Visual Studio\2022\Professional
have been able to update, along with the update vs_installer has been updated to version 3.8.2122.285739328
.
up until yesterday, you could see the success in dd_bootstrapper_*.log in %temp% :
...
[4044:0008] [2024-02-13T18:37:27] Comparing client version '3.8.2122.285739328' to autoSelfUpdateMinVersion '3.8.2122.285739328'
...
[4044:0008] [2024-02-13T18:37:27] VS setup process C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe started. All done.
[4044:0008] [2024-02-13T18:37:27] Waiting for setup process to complete...
[4044:000a] [2024-02-13T18:37:32] Pipe disconnected.
[4044:0008] [2024-02-13T18:37:32] VS setup process exited with code 0
[4044:0008] [2024-02-13T18:37:32] Bootstrapper Successfully completed.
As of today, the same command fails, vs_professional exists with ‘5008’ and dd_bootstrapper_*.log in %temp% cotains the following lines.
...
[0700:0007] [2024-02-14T07:43:21] Latest installer feed version 3.9.2164.285805670 greater than self update min version: 3.8.2122.285739328
[0700:0007] [2024-02-14T07:43:21] Comparing client version '3.8.2122.285739328' to autoSelfUpdateMinVersion '3.9.2164.285805670'
[0700:0007] [2024-02-14T07:43:21] Using Offline package: \\path-to-layout\vs_installer.opc
[0700:0007] [2024-02-14T07:43:21] Saving Certificates to layout folder
[0700:0007] [2024-02-14T07:43:22] Package signature verification returned Success for path:\\path-to-layout\vs_installer.opc
[0700:0007] [2024-02-14T07:43:22] Current OptIn value is 1
[0700:0007] [2024-02-14T07:43:22] Extracting file 'vs_installer.version.json' from package stream.
[0700:0007] [2024-02-14T07:43:22] File found 'vs_installer.version.json' in package stream.
[0700:0022] [2024-02-14T07:43:23] Download requested: https://download.visualstudio.microsoft.com/download/pr/36f29b27-1fec-4bff-b8ed-243475a41412/85663fdde2205b96d817390340144a08/latestinstaller.json
[0700:0023] [2024-02-14T07:43:23] Attempting download 'https://download.visualstudio.microsoft.com/download/pr/36f29b27-1fec-4bff-b8ed-243475a41412/85663fdde2205b96d817390340144a08/latestinstaller.json' using engine 'WebClient'
[0700:0023] [2024-02-14T07:43:23] ManifestVerifier Result: Success
[0700:0023] [2024-02-14T07:43:23] Download of 'https://download.visualstudio.microsoft.com/download/pr/36f29b27-1fec-4bff-b8ed-243475a41412/85663fdde2205b96d817390340144a08/latestinstaller.json' succeeded using engine 'WebClient'
[0700:0007] [2024-02-14T07:43:23] ManifestVerifier Result: Success
[0700:0007] [2024-02-14T07:43:23] Latest installer feed version 3.9.2164.285805670 greater than self update min version: 3.8.2122.285739328
[0700:0007] [2024-02-14T07:43:23] Comparing client version '3.8.2122.285739328' to autoSelfUpdateMinVersion '3.9.2164.285805670'
[0700:0007] [2024-02-14T07:43:23] Warning: Unexpected Installer Version. Starting version='3.8.2122.285739328' Launching version='3.8.2122.285739328' MinVersion='3.8.2122.285739328'.
[0700:0007] [2024-02-14T07:43:23] Bootstrapper failed with known error.
This 'known error' causes vs_professional to exit with exit code 5008.
Following the documentation, one might guess that vs_professional.exe --quiet --update --offline
before doing the actual upgrade might update vs_installer to the latest version before:
Does not work. (same error in vs_bootstrapper log)
Sidenote: there are some inconsistencies in the offline-layout maintenance instructions (i.e. --offline is not documented, --noUpdateInstaller does behave differently when there is a internet connection available/if there is not)
Upvotes: 1
Views: 720
Reputation: 1075
I've been in touch with Microsoft Support and indeed, vs_installer version ‘3.9.2164.285805670’ has been releases which causes the update from the offline-layout to fail.
tldr;-
It seems that you can work around this issue by grabbing the new version of vs_installer from https://aka.ms/vs/install/latest/installer and install it before running the upgrade from the offline layout.
\\path-to-layout\vs_professional.exe --quiet --update --offline path_to\vs_installer.opc
When using offline-layouts this is normally not something you'd want to do, but I've basically already given up on trying to make some sense of the Visual Studio Installer ecosystem. I've been rambling about this and similar issues vs2019 - here and vs2017 - here.
At this point I suggest to do the following:
-noUpdateInstaller
I.e. when you're managing your deployments with Chocolatey packages, one could easy pop a tiny PowerShell-script up front:
$tempFile = Join-Path $env:TEMP 'vs_installer.opc'
if (Test-Path $tempFile) { Remove-Item $tempFile -Force }
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -URI 'https://aka.ms/vs/install/latest/installer' -OutFile $tempFile -ErrorAction Stop -UseBasicParsing
$vsInstallerUpdateParams = @{
ExeToRun = '\\path-to-layout\vs_professional.exe'
Statements = "--quiet --wait --update --offline $tempFile"
}
Start-ChocolateyProcessAsAdmin @vsInstallerUpdateParams
~ hope this might help someone ~
Upvotes: 3