Most efficient way to create a layout for an offline installation of visual studio

Greg Booth 1,296 Reputation points
2024-01-15T18:02:32.6166667+00:00

I have created a layout for an offline installation of visual studio 2019 (community edition).

This was done on machine1 which had internet access, using the command

vs_community.exe --layout c:\vslayout --lang en-US --add Microsoft.VisualStudio.Workload.Data --add Microsoft.VisualStudio.Workload.DataScience --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.Office --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Workload.VisualStudioExtension --add Microsoft.VisualStudio.Component.SQL.SSDT --add Component.GitHub.VisualStudio

This worked and created the folder c:\vslayout on machine 1, approx 4.33 GB.

We then copied this to a network share.

We then wanted to use the to create an offline install on machine2.

So we copied the vslayout folder to machine2 i.e. to c:\vslayout.

Then to do an offline install on machine 2, from a cmd prompt as admin we used the following command:

c:\vslayout\vs_community.exe --noweb --add Microsoft.VisualStudio.Component.SQL.SSDT

This start Visual Studio Installer, says its getting the installer ready (green tick for downloaded, installed)

Then "Getting things ready"

It then displays a list of workloads ( with several already checked). I untick to only leave "Data Storage and Processing". It says "Total space required: 2.39 GB"

There is an option to Install while downloading OR download all then install, but when i press install , it starts a download operation which wont work as there is no internet access.

Why is it trying to download resources when i am running the installer from the layout folder ? It should already have all the files it needs. The option to use --nocache when creating the layout does not work

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,000 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 28,951 Reputation points Microsoft Vendor
    2024-01-16T03:26:27.11+00:00

    Hello @Greg Booth,

    Welcome to Microsoft Q&A forum.

    It should already have all the files it needs.

    Yes. Sometimes, the installation will be blocked by certificates. Please try to open the vslayout folder on machine 2 and follow this document: Manually install certificates from a layout folder to manually install the certificates. After that install VS offline again, check if this works.

    I think the vslayout folder has been generated correctly on your side, but if manually installing certificates doesn’t work, please try to use --verify and --fix parameters to verify and fix the vslayout(for example, vs_community.exe --layout c:\vslayout --lang en-US --add xxxx --add xxxx --verify --fix), copy and use the fixed layout folder to install VS again.

    Besides, I notice that you ran c:\vslayout\vs_community.exe --noweb --add Microsoft.VisualStudio.Component.SQL.SSDT command but leave "Data Storage and Processing" workload to be checked. Firstly, you need to use --noWeb instead of --noweb, secondly, if you just want to install "Data Storage and Processing" workload, try to use corresponding workload ID => --add Microsoft.VisualStudio.Workload.Data instead of --add Microsoft.VisualStudio.Component.SQL.SSDT.

    Sincerely,

    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.