Hi @正寅 吴 ,
Installing or updating VS/VS Installer offline includes two parts:
Part one => prepare the layout(on machine with network),
Part two => install/update from the layout(on machine offline).
You need to update the layout to include the newer version of VS Installer(part one), move the layout to offline machine and update the VS Installer(part two).
Before starting, you need to firstly confirm if the installed VS was installed by using a layout. Here are two situations:
One => the installed VS was installed by using a layout,
Two => the installed VS was installed online, but now, the machine was offline.
We are talking about the first situation. So, you should know the location of this layout, as you need to move it to the machine with network, update it and move it back to this offline machine and update the VS Installer.
Additional important thing is that, on part one, based on my test, updating the VS Installer separately in layout is not supported. You need to update the whole layout. However, on part two, after you move the updated layout to the offline machine, you can choose to only update VS Installer, not VS.
So, for part one, you can move the layout to the machine with network. Download the latest VS bootstrapper file from here: Downloads. Run the command like following:
C:\XXXX\VisualStudioSetup.exe --layout C:\XXXX\MyLayout
You need to change the paths to your specific paths. The --layout
command is enough, see this document: Update the layout to the most current version of the product for more details.
After the layout has been updated. Move it to offline machine.
For part two, use the command like following:
C:\XXXX\MyLayout\vs_xxxxxx.exe --update
to update only VS Installer(details: Update).
Note, please backup your previous layout before you try to update it. As, if you fail to update VS Installer or VS is updated by mistake, you can use this previous layout to roll back VS.
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.