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