Visual Studio files association in Windows

Mariano Desanze picture Mariano Desanze · Sep 21, 2017 · Viewed 9.4k times · Source

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

Answer

Mariano Desanze picture Mariano Desanze · Sep 21, 2017

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.