Configure Visual Studio in your organization with .vsconfig

Original author: Heath Stewart
  • Transfer
In Visual Studio 2017 Update 15.9, we added the ability to export and import a workload and select components in the Visual Studio installation configuration file. Developers can import these files into new or existing installations. Checking these files in your source repositories makes them easy to share. However, developers still need to import them to get the necessary features.

In Visual Studio 2019, the automatic installation of missing components has been added. Details under the cut!

Automatic installation of missing components


New in Visual Studio 2019 : you can save these files as .vsconfig files in the root directory of the solution, and when the solution (or the solution directory) is opened, Visual Studio will automatically detect which components are missing and prompt you to install them.

image

You can find an example of this in the vswhere repository on GitHub. When you click Install , you are prompted to install all the missing components. You can click View full installation details if you want to select additional components.

image

image

Export your configuration


In Visual Studio 2019, you can create a .vsconfig file directly from Solution Explorer:

  1. Right click on your solution.
  2. Click Add> Installation Configuration File .
  3. Confirm the place where you want to save the .vsconfig file (by default, this is the root directory of your solution).
  4. Click Review details .
  5. Select or discard any changes you want to make and click Export

To minimize installation costs, export only those components that are needed to build, test, and publish the solution. One way to do this is to install a second instance of Visual Studio or install it on a virtual machine, add workloads and additional components needed to build and test the solution. Add components as needed until the solution is successfully built, and then export your configuration.

Feedback


We look forward to seeing your feedback! You can report a problem or make suggestions for this or any other Visual Studio feature on our Developer Community site .

Also popular now: