Visual Studio

Visual Studio

Very powerful IDE from Microsoft (note: different than free & open source Visual Studio Code.)

Multiple versions available, including free community edition.

Installation

Individual Machine

Just use the web installer and follow the prompts.

Network Cache Installation

installation options are controlled by a Layout.

Layouts can be added to and updated. They include a local copy of the installation packages.

Machines just run e.g. vs_community.exe from a shell prompt to use the cache and install the same configuration!

Use the Visual Studio bootstraper: https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019

Details on updating a cached layout, installing on other machines, etc: https://docs.microsoft.com/en-us/visualstudio/install/create-a-network-installation-of-visual-studio?view=vs-2019

More info on controlling network-based deployments: https://docs.microsoft.com/en-us/visualstudio/install/controlling-updates-to-visual-studio-deployments?view=vs-2019

Using an Existing VS Installation as a Template

  • run vs_installer
  • select desired install, more->export configuration (ref)
  • open an admin command prompt
  • cd to the network location to be used as the cache location
    • network shares mounted as another user may not be visible. Issue net use <drive>: //server/share in the admin command prompt (ref)
  • create a minimal Layout: .\vs_community.exe --layout . --add "Microsoft.VisualStudio.Component.CoreEditor" --lang en-US
  • load the generated vsconfig file into an editor
  • load the layout.json file from the Layout directory
  • copy the contents of the "components" array from vsconfig to the "add" array of layout.json
  • copy layout.json over response.json (they appear to have duplicate content.)
  • if installing for use with Unity, make note of any extra command line options (workloads, other options) for the vs_community.exe installation manager that Unity added to install.bat
    • e.g. "vs_community.exe" --productId "Microsoft.VisualStudio.Product.Community" --add "Microsoft.VisualStudio.Workload.ManagedGame" --add "Microsoft.VisualStudio.Workload.NativeDesktop" --add "Microsoft.VisualStudio.Component.VC.Tools.x86.x64" --add "Microsoft.VisualStudio.Component.Windows10SDK.16299" --campaign "Unity3d_Unity" --passive --norestart --wait
  • update the layout to match desired configuration: .\vs_community.exe --layout . --campaign "Unity3d_Unity" --lang en-US
    • pay careful notice of output; any errors in the "add" section (or other sections?) will lead to ALL visual studio workload packages being downloaded!

Install from Network Cache

On target machine, from an admin shell, cd to the Layout location and run .\vs_community.exe or .\vs_community.exe --quiet --wait --norestart to silently install (in the background - no indication of what’s happening!)

For Unity, try .\vs_community.exe --campaign "Unity3d_Unity".

Updating Layout

Can adjust workloads by running vs_community.exe in the Layout directory with --add options. They will add to, not replace workloads in layout.json.