Removing out-of-support components from your Visual Studio installations
Visual Studio is a rich IDE that provides an abundant collection of tools and functionality for developers to use in every stage of software development. As we all know, technologies change over time, some faster than others; consequently, certain components that are initially included with Visual Studio may go out of support faster than the IDE itself. When a component transitions to “out of support”, it will not receive any future updates, including security fixes.
Using the latest Visual Studio 2022 version 17.4 installer, it is now possible to bulk remove all components from your Visual Studio installation that have transitioned to an “out-of-support” state. You can do this manually through the UI, programmatically, or by machine wide policy, and you’ll be able to manage both your client machines and your layouts. This functionality can also be used to manage and maintain older Visual Studio 2019 or 2017 installations. By using this new feature when you perform updates, you will be better able to keep your machine secure.
First, let’s briefly review the prior behavior, as this will help illustrate the improvements we’ve made.
Up until now, when a component transitioned to an out-of-support state, the UI in the installer was simply updated to display an “out of support” label. It was up to the user to periodically review their installation settings UI (for each instance of Visual Studio installed on the machine), and then evaluate and decide on which components they might want to uninstall. This approach, while functional, didn’t easily scale across all client machines within an organization.
Removing out-of-support components
It’s now really easy to bulk remove all of the out-of-support components on your client machines using one of the following methods with the latest installer:
Option 1: On-demand removal of out-of-support components
You can initiate a single, on-demand removal of all out-of-support components. This functionality can be accessed via the new “Remove all out-of-support components” button in the Installer’s “Modify” dialog as shown below, or you can programmatically use the new –removeOos parameter with the modify command. Either way will essentially bulk deselect everything that’s decorated with an out-of-support label, causing them all to be uninstalled during the next update. The key benefit of this method is that you can control the timing for when the out-of-support component removal happens. For example, if you want to explicitly remove out-of-support components once every few months, this on-demand method will give you time to notify any potentially affected developers, which will in turn give them time to assess impact and remove any project dependencies from components that may disappear. Remember that you can always modify the installation again and add these components back if so desired.
Figure 1: Modify an existing installation to bulk deselect all the out-of-support components
Option 2: Persistent removal of out-of-support components for a specific instance of Visual Studio
If you practice good software hygiene habits and regularly update Visual Studio monthly to stay secure, you may also want your specific instance of Visual Studio to just always automatically remove components as soon as they transition to an out-of-support state. To do this, you can enable the new persistent “Remove all out-of-support components during future updates” option in the Update Settings dialog, as illustrated below. This option is also available programmatically using the modifySettings verb. This setting will cause the out-of-support uninstallation behavior to be sticky and persist across all future updates for that instance of Visual Studio, so that once any component transitions to out of support, it’ll simply be removed during the next Visual Studio update.
Figure 2: The Update Settings dialog allows you to persistently remove all out-of-support components during each subsequent update
Option 3: Configuring global policy to uninstall all out-of-support components
IT Administrators can also set machine wide policy that will apply this persistent setting to all instances and all versions of Visual Studio installed on the machine. This global policy supersedes the removal methods discussed above, and the global policy superpower will disable the UI appropriately as illustrated below. This policy can help organizations stay clean with respect to compliance vulnerability detection scans and reports. You can use the Visual Studio Administrative Templates (ADMX) to manage policy configurations across your organization.
Figure 3 – Remove out-of-support components option configured via organizational policy
Suppressing out-of-support components in your layout
Many enterprises use network layouts to control what version of Visual Studio the client machines acquire. If you’re using Administrator updates to keep your clients secure, then it’s possible to configure your layout to instruct the Administrator update to remove out-of-support components on the client machine.
Support for older versions of Visual Studio
As mentioned above, the ability for the installer to remove out of support components is a new feature introduced in Visual Studio 2022 and will be available with all supported minor versions, including LTSC channels. However, it is possible to extend this behavior to Visual Studio 2019 and Visual Studio 2017 products as well – you just need to get the Visual Studio 2022 installer on those client machines. The three easiest ways of getting the latest installer onto a machine with an older version of Visual Studio is to either install some version of Visual Studio 2022 on the client machine, deploy any Administrator update to the client machine, or include the latest installer in your network layout.
Please review the documented list of out-of-support components to understand what components have transitioned to an out-of-support state and will be uninstalled should you choose to use this feature.
For more information, please refer to the Visual Studio Administrators Guide. As always, we welcome your feedback. For problems or suggestions, please let us know by submitting your feedback at Visual Studio Feedback.
J’ai Visual Studio pro 2019 16.11.20 et 2022 pro preview17.5.0 sur la même machine. Comment faire pour supprimer 2019 sans perdre des fonctions ou autres dans 2022 ?
If I understand the question correctly, you should be able to just uninstall Visual Studio 2019 and it should *not* affect your 2022 installation at all. The easiest way to do this is to launch the Visual Studio Installer, and in the Visual Studio 2019 product card choose More/Uninstall.
Salut Thierry! Ouvrez le “Installer” et cliquez sur “Plus” -> “Désinstaller”. Visual Studio 2022 ne sera pas affecté.
Merci. Je vais faire.
Visual Studio is non-stop lagging and becoming unresponsive aka defacto crashing with this update. I reverted to the last version and it still works. I dont know what you did with this one but it’s not good
Rather than removing out-of-support components, is there a way to bring back out-of-support components? I would really appreciate having a XAML designer/previewer in Xamarin Forms.