In Windows Explorer when I double-click on any Visual Studio file (*.cs
, *.csproj
, etc.), it's opening an old version of VS instead of the latest one (VS 2017). And VS has associations with too many file types.
How can I change the default Visual Studio (for all those files that VS can handle)?
There is a similar old question about Visual Studio 2008 (Move file associations from Visual Studio 2005 to 2008) but the solution in there doesn't work anymore (there is no "Restore File Associations" button on the settings of Visual Studio 2017).
Windows allows you to change file associations by going into Settings > Apps > Default Apps and selecting at the bottom the option titled "Choose default apps by file type". This will open a screen that lists all of the configured extensions on the computer and the program associated with them.
File associations are registry settings that tell Windows what application to use to open files of a certain type. For example, Windows typically launches Notepad.exe when a text (. txt) file is opened.
Step 1: Right-click on a file of the type you wish to change the association for. Step 2: Select Open With from the resulting menu. Step 3: Windows will then offer you an app or a list of apps that can act as the default for that file type.
Each version of Visual Studio registers itself in the Set Default Programs
panel of the Control Panel
.
Go to Control Panel\Programs\Default Programs
Then choose Set Default Programs
:
In there you can simply choose the Visual studio version of your choice and then click the button Set this program as default
in order to associate every file type that VS handles.
Or you might prefer to click the button Choose defaults for this program
to review the current associations of those file types and change only the ones you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With