mwallner
mwallner

Reputation: 1075

Visual Studio 2017 (Professional) Offline Update Layout Is Missing Packages

A while ago I've created a offline install layout for VS2017 Professional (Version 15.5) - this is the base for a couple of dev-hosts at work.

Now we want to upgrade to VS2017 - version 15.8 - so I've createad a 1:1 copy of the existing layout and ran

vs_Professional.exe --layout <path_to_layout> 

which ran for a while and updated ?all? packages in the layout.

doing a clean install with this updated layout does work well, however - when using this layout to update one of the hosts that have version 15.5 installed the update procedure fails with exit code "1".

sidenote: VS actually states that it's now 15.8.4 - but it exits with an error code .. so ..?

the command I use for install/update is (drop the "update" for the clean installation)

vs_Professional.exe update --passive --norestart --wait --productkey $productKey --nocache --noUpdateInstaller --noWeb

using collect.exe there is a state.errors.json file which states that a couple of packages are missing on the layout path...

NOTE: I need to have all required packages available in the offline layout - because some of the PCs do not have internet access (despite we've got the requirement that those vs-setups need to be identical...)

I've tried to reach out to Microsoft Support but didn't hear back from the till now. - anyone else having this issue / was able to solve it?

Upvotes: 4

Views: 2644

Answers (1)

mwallner
mwallner

Reputation: 1075

The update process of an MSFT Visual Studio offline layout seems to be rather buggy, yet there is at least 1 way which seems to work consistently:

always, always, always note the exact parameters you've used to create a offline layout! (all packages, included extras, language - the exact command line(s) you've used!

1: create a copy of the existing offline layout

You'll want to do that if you need to be able to keep using the old layout version for new installs, as Sara Liu pointed out in the comments of the original question. (installing a 'older version' of an updated layout is not supported.)

Also, in case something breaks during the update - you don't loose anything ;-)

2: update the duplicated offline layout

vs_Professional.exe --layout <path_to_layout> 

after this finished you should be able to install the new VisualStudio version from this updated layout, yet upgrading a older version will probably fail.

To resolve this, MSFT gives you the

vs_Professional.exe --verify
vs_Professional.exe --fix

tools you can throw at your layout - but don't expect it to work - it never figured out what packages have been missing in my scenarios.

if you follow point 3, you'll also be able to upgrade existing installations.

3: create a new layout with the same parameters as the original one and copy the files over the updated layout

it's quite weird I know - but this has given me the missing packages for the upgrade scenario all the time. just don't forget to fix your ChannelManifest.json afterwards.

Upvotes: 2

Related Questions