Reputation: 65
I have updated a VisualStudio 2022 Professional offline layout from version 17.6.10 to 17.8.0 but whenever I try to update an actual installation of VisualStudio 17.6.10 to 17.8.0 using these offline installation files, I get an error that tells me that there are packages missing from my layout cache. Specifically, I get the following message:
The following required packages are missing from the layout cache:
Microsoft.NetCore.Templates.6.0.8.0.100-rtm.23551.15,version=17.8.34308.169,machinearch=x64
Microsoft.NetCore.Templates.7.0.8.0.100-rtm.23551.15,version=17.8.34308.169,machinearch=x64.
To restore these packages, fix your layout from the command line.
I have created the 17.8.0 layout by first downloading the fixed version bootstrapper for VisualStudio 2022 17.8.0 from Microsoft. Then, I started the downloaded vs_Professional.exe
as follows:
vs_Professional --layout C:\vs2022pro
with C:\vs2022pro
being the folder that contains the layout (including all corresponding packages) for VisualStudio 17.6.10. I have used this layout to install VisualStudio 2022 17.6.10 on many computers. The Layout.json
for the 17.6.10 layout looks as follows
{
"installChannelUri": ".\\ChannelManifest.json",
"channelUri": "https://aka.ms/vs/17/release.ltsc.17.6/channel",
"installCatalogUri": ".\\Catalog.json",
"channelId": "VisualStudio.17.Release.LTSC.17.6",
"productId": "Microsoft.VisualStudio.Product.Professional",
"add": [
"Microsoft.VisualStudio.Component.ClassDesigner",
"Microsoft.VisualStudio.Component.DependencyValidation.Community",
"Microsoft.VisualStudio.Component.GraphDocument",
"Microsoft.VisualStudio.Component.NuGet.BuildTools",
"Microsoft.VisualStudio.Component.VC.140",
"Microsoft.VisualStudio.Component.VC.ATLMFC",
"Microsoft.VisualStudio.Component.VC.CLI.Support",
"Microsoft.VisualStudio.Component.VC.Llvm.Clang",
"Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset",
"Microsoft.VisualStudio.Component.VC.Modules.x86.x64",
"Microsoft.VisualStudio.Component.VC.v141.ATL",
"Microsoft.VisualStudio.Component.VC.v141.MFC",
"Microsoft.VisualStudio.Component.VC.v141.x86.x64",
"Microsoft.VisualStudio.Component.Wcf.Tooling",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang",
"Microsoft.VisualStudio.Workload.Azure;includeRecommended",
"Microsoft.VisualStudio.Workload.ManagedDesktop;includeRecommended",
"Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended",
"Microsoft.VisualStudio.Workload.NetWeb;includeRecommended",
"Microsoft.VisualStudio.Workload.Python"
],
"addProductLang": [
"en-US"
],
"arch": "x64"
}
During the layout update the VisualStudio installer has successfully verified the packages in the 17.6.10 layout and download various new packages for the 17.8.0 version, the whole layout updating process ended with a success. The resulting 17.8.0 Layout.json
was identical to the 17.6.10 layout except for the channelUri
and channelId
as they were both changed to 17.8.
I then created a zip archive of this folder and moved it to a computer which had VisualStudio 2022 17.6.10 installed. On this computer I have first updated the VisualStudio installer by executing the following command
C:\vs2022_17-8-0\vs_Professional.exe --quiet --update --offline C:\vs2022_17-8-0\vs_installer.opc
Subsequently, I have started the update process by executing the following command in a CMD terminal with administrative privileges
C:\vs2022_17-8-0\vs_Professional.exe update --noWeb --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\Pinned"
because the local VisualStudio 2022 17.6.10 installation was at C:\Program Files (x86)\Microsoft Visual Studio\2022\Pinned
.
The VisualStudio installer GUI appeared and for quite a while nothing happened - and then an error message popped up that said the following
The following required packages are missing from the layout cache:
Microsoft.NetCore.Templates.6.0.8.0.100-rtm.23551.15,version=17.8.34308.169,machinearch=x64
Microsoft.NetCore.Templates.7.0.8.0.100-rtm.23551.15,version=17.8.34308.169,machinearch=x64.
To restore these packages, fix your layout from the command line.
The exit code was 8005.
I have tried to run C:\vs2022_17-8-0\vs_Professional.exe --fix --layout C:\vs2022_17-8-0
but this process has never discovered any missing packages.
I cannot find any information about which VisualStudio component actually contains the missing packages and I also do not understand why these two packages are even relevant - the offline layout contains Microsoft.NetCore.Templates.8.0.8.0.100-rtm.23551.15,version=17.8.34308.169,machinearch=x64
after all.
EDIT: You can actually use the Catalog.json file in your layout's directory to find out to which workload or component a specific package belongs. In my case, the package Microsoft.NetCore.Templates.6.0.8.0.100-rtm.23551.15,version=17.8.34308.169,machinearch=x64
is actually a dependency of the component Microsoft.NetCore.Component.Runtime.6.0
.
Previously, I used the method described above to update VisualsStudio 2022 17.4.6 to 17.6.10 and this worked without issues. Also, a clean installation of VisualStudio 2022 17.8.0 using that offline layout works flawlessly.
What am I missing?
EDIT: I specifically need the VisualStudio update to not require an Internet connection. Removing the --noWeb
flag therefore is not an option.
EDIT2: I found out that the 17.8.0 layout also cannot be used to perform an offline update of a VisualStudio 17.4.3 installation. Here, the 17.8.0 installer complains that even more packages were missing. So do I really have to update my 17.4.3 installation to 17.6.10 first (this works flawlessly by the way)? This sounds wrong to me - and then the update from 17.6.10 to 17.8.0 does not work anyway.
Upvotes: 2
Views: 4623
Reputation: 149
What about using minimal offline layout, Then after installing the MinimalLayout.exe, creating an update by running the following command in CMD using Administrator privileges:
"C:\Program Files (x86)\Microsoft Visual Studio\MinimalLayout\MinimalLayout.exe" Generate --targetLocation "D:\VisualStudio2022_17.8.3Update" --baseVersion 17.6.5 --targetVersion 17.8.3 --languages en-US --productIds Microsoft.VisualStudio.Product.Enterprise
Please replace :
D:\VisualStudio2022_17.8.3Update
with the location you want to store the update, and
17.6.5
with the version you are updating from, and
17.8.3
with the version you are updating to, and
en-US
with the language you want, and
Microsoft.VisualStudio.Product.Enterprise
with the product ID you want.
Upvotes: 0
Reputation: 65
I ended up doing the following:
In the VS2022 17.8 layout directory there is a Catalog.json
file. This file contains a list of all available VS workflows, components and their dependencies/subcomponents. In this file, I searched for Microsoft.NetCore.Templates.6.0.8.0.100-rtm.23551.15
, a package that was missing from my layout according to the installer, and found out that it is a dependency of the VS component Microsoft.NetCore.Component.Runtime.6.0
. Similarly, Microsoft.NetCore.Templates.7.0.8.0.100-rtm.23551.15
is a dependency of Microsoft.NetCore.Component.Runtime.7.0
.
Thus, I added the VS components Microsoft.NetCore.Component.Runtime.6.0
and Microsoft.NetCore.Component.Runtime.7.0
to my layout and then repeated the offline update process (see my question for details) - this time it worked without an issue.
What's a bit strange: Some components that are new in 17.8 (i.e. they were first released for 17.8 and were never available for 17.6) are not installed during an update from 17.6, e.g. Microsoft.VisualStudio.Component.Vcpkg
, Microsoft.VisualStudio.Component.CppBuildInsights
, and Microsoft.VisualStudio.Component.SecurityIssueAnalysis
. When performing a new installation of 17.8 these components are installed however.
Upvotes: 0