Firstly you need to uninstall the current version of Visual Studio if any by following the path as shown below :-
Uninstalling the current release :
- On Windows, open the Visual Studio Installer.
- Uninstall all instances of Visual Studio 2019 listed in the Visual Studio Installer.
- From Programs and Features in the Control Panel, find "Microsoft Visual Studio 2019", and uninstall it.
If you are unable to follow the steps above due to a corrupted install, do the following instead:
- You should have access to InstallCleanup.exe from C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout. Note:
If you do not find InstallCleanup.exe in this folder, then you can follow the below steps to acquire it:
--> Go to VisualStudio.microsoft.com/downloads, and select a version to download.
--> When prompted to select a workload to install, close the window (do not install anything).
--> Then close the Visual Studio Installer window (do not install anything).
- Using Command Prompt in administrator mode, go to that directory and run InstallCleanup.exe -f.
Please note, uninstalling Visual Studio will not remove standalone products and components such as .NET, SQL, IIS, VC++ Redistributables, and SDKs. These may need to be removed manually from Programs and Features in the Control Panel.