Training
Learning path
Implement finance and operations apps - Training
Plan and design your project methodology to successfully implement finance and operations apps with FastTrack services, data management and more.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You can use installation configuration files to configure what Visual Studio installs. To do so, export the workloads, components, and Marketplace extension information into a .vsconfig
file by using the Visual Studio Installer. Once you have a *.vsconfig
file, you can further refine it manually and add or remove additional items. The structure and syntax of the *.vsconfig
file is described below. You can also import the configuration file into a new or existing Visual Studio installation, use it to create or modify a layout or an offline installation, put it in a solution directory or repo and trigger an install of missing components, and share it with others.
You can export an installation configuration file from a previously installed instance of Visual Studio.
Note
Starting with Visual Studio 2022 version 17.10 Preview, you can now export Visual Studio Marketplace extensions that were loaded in an instance wide context into a *.vsconfig file. If you'd like the export
functionality to be able to export other types of extensions such as those loaded from a network share or those loaded in user context, please let us know.
Open the Visual Studio Installer.
On the product card, choose the More button, and then select Export configuration.
Browse to or type the location where you want to save your .vsconfig file, and then choose Review details.
Verify that your selections are accurate, and then choose Export.
You can programmatically export a configuration file of a particular Visual Studio instance by using the export
verb as described in the Install Visual Studio from the command line documentation.
You can import an installation configuration file into a previously installed instance of Visual Studio, or you can use it to initialize a new installation of Visual Studio. Importing a configuration file into Visual Studio will install anything listed in the config file that's not already installed.
When you're ready to import an installation configuration file, follow these steps.
Open the Visual Studio Installer and close Visual Studio. Most Installer operations require that the Visual Studio product itself is closed.
On either the Installed tab or the Available tab, select More > Import configuration on the Visual Studio product card.
Locate the .vsconfig
file that you want to import, and then choose Review details.
Verify that your selections are accurate, and then choose Modify.
You can use the --config
parameter to either initialize or modify an existing installation and add components. The example below uses the installer on the client machine to modify
an existing installation.
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Professional" --config "C:\myconfig.vsconfig" --passive --allowUnsignedExtensions
Note
To add components to an existing installation by using a config file (*.vsconfig
), you'll need to modify
your installed product and not update
it. Update
just updates existing installed components to the latest version. To learn more about the different installer operations, refer to the Install Visual Studio from the command line documentation.
Using the correct bootstrapper that corresponds to the version and edition of Visual Studio that you want, open an administrator command prompt and run the following command to use the --config
parameter to configure the contents of a layout. More information about using *.vsconfig files to initialize and install from layouts can be found here.
vs_enterprise.exe --layout "c:\localVSlayout" --config "c:\myconfig.vsconfig" --lang en-US
If you save a *.vsconfig
file into your solution root directory and then open a solution, Visual Studio will automatically detect any missing components and will prompt you to install them.
Note
If your *.vsconfig
file contains extensions, then currently, only those extensions that are hosted on the Visual Studio Marketplace will trigger the automatic "is-missing" detection and installation. If you would like this logic to include extensions that were installed from a non-Marketplace location, please provide details about your scenario here.
You can also generate a *.vsconfig
file right from Solution Explorer.
Right-click on your solution file.
Choose Add > Installation Configuration File.
Confirm the location where you want to save the .vsconfig file, and then choose Review details.
Make sure you've got the workloads and components that you want, and then choose Export.
We also created an open source utility that locates Visual Studio installation configuration *.vsconfig
files downstream recursively and merges them all together. You can find more information about the VSConfigFinder tool here.
The *.vsconfig
file is a json file format that contains a components section and optionally an extensions section. The components section contains workloads and components and looks like this:
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.NuGet"
]
}
Starting in Visual Studio 2022 version 17.9, you can specify extensions in the *.vsconfig
file and use the Visual Studio Installer to load them machine wide making them available for all users. Starting in Visual Studio 2022 version 17.10 Preview, you can use the Visual Studio Installer to export
Visual Studio Marketplace extensions into the *.vsconfig file that were loaded in an instance wide context as described previously.
There are a few known caveats with supporting extensions in the config file.
*.vsix
package or those that aren't exceedingly "complicated". If you have an extension that is not being loaded via a config file properly, please let us know about it via a new Developer Community suggestion.*.vsconfig
file to add extensions, then you will also need to use the new --allowUnsignedExtensions
parameter to allow unsigned extensions to be loaded in --passive
or --quiet
context. If you're installing from a layout, you can add the "allowUnsignedExtensions" : true
syntax to your response.json
file to achieve a similar effect.All instance wide extensions are automatically updated approximately once a day via a scheduled task. You can find more information here.
The .vsconfig file format that includes extensions should look like this.
{
"version": "1.0",
"components": [
// Whatever components you want to install come here, in quotes, separated by commas.
// You can use the installer to select the components you want to install and then export them,
// Or you can specify the ones you want according to the [component-id's](https://learn.microsoft.com/en-us/visualstudio/install/workload-and-component-ids).
// This array should not be null! If you don't want to install any component, just leave the array empty.
],
"extensions": [
// The extensions you want to install are specified in this section, in quotes, separated by commas.
// Extensions are optional in .vsconfig, so if you don't want any, you can delete the entire extensions section.
// The extensions must be in a *.vsix package
// Make sure that the extensions you specify are designed to work with that version of Visual Studio.
// examples below
"https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ImageOptimizer64bit", //unsigned extension
"https://marketplace.visualstudio.com/items?itemName=vsext.RegexMatchVisualizer", //signed extension
"c:\\mylocaldrive\\someextension.vsix",
"\\\\server\\share\\myextension.vsix",
"https://myweb/anotherextension.vsix"
]
}
Sometimes, things can go wrong. If your Visual Studio installation fails, see Troubleshoot Visual Studio installation and upgrade issues for step-by-step guidance.
Here are a few more support options:
Training
Learning path
Implement finance and operations apps - Training
Plan and design your project methodology to successfully implement finance and operations apps with FastTrack services, data management and more.