Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio files association in Windows

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).

like image 739
Mariano Desanze Avatar asked Sep 21 '17 19:09

Mariano Desanze


People also ask

How do I see file associations in Windows?

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.

What is a Windows file association?

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.

How do I set file associations?

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.


1 Answers

Each version of Visual Studio registers itself in the Set Default Programs panel of the Control Panel. Go to Control Panel\Programs\Default Programs

"Default Programs"

Then choose Set Default Programs:

Default Visual Studio 2017

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.

like image 143
Mariano Desanze Avatar answered Sep 26 '22 20:09

Mariano Desanze