Imre Pühvel
Imre Pühvel

Reputation: 4994

How to extract currently installed Visual Studio component IDs?

I want to automate VS2017 install/upgrade VS for new team members by applying the same install configuration as an existing installation.

It seems this can be done using VS installer command line parameter --in <json file> parameter which could be passed a list of component ids to install as shown in "Example layout response file content".

While I could manually consider and search for all required component IDs and their dependencies, it would be much simpler to just export the configuration from some existing properly configured VS environment and import it on new install.

How can I extract the list of currently installed VS workload and component IDs?

Upvotes: 2

Views: 3516

Answers (2)

StayOnTarget
StayOnTarget

Reputation: 13008

You can trigger the export procedure from within Visual Studio if you have a solution open. This will create the vsconfig for that particular solution.

In Solution Explorer, ight click on the solution node, then select Add, then Installation Configuration File.

It will then run the VS installer and go through the same export noted in the other answer.

More details: https://learn.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2022#use-a-configuration-file-to-automatically-install-missing-components

Upvotes: 0

Sara Liu - MSFT
Sara Liu - MSFT

Reputation: 6218

Please run the VS installer as administrator and click More-Export configuration, follow the steps, then we will get the .vsconfig file that listed the installed workloads and components like the following:

enter image description here

enter image description here

Upvotes: 5

Related Questions