Reputation: 8163
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).
Upvotes: 9
Views: 12703
Reputation: 8098
Yet another in a long list of previously working-just-fine things which Microsoft have managed totally #$@%@ up. If I try to change defaults the 'right' way I get this kind of thing:
i.e. completely ignored. The only way I've managed to solve it is by removing the file association entirely through the registry. Let's take .asm
as an example:
regedit.exe
"HKEY_CLASSES_ROOT\.asm\OpenWithProgIds
From there, you can (finally) open files with whatever you choose instead of having the association clamped to Visual Studio:
For the record, I believe this to be a problem with Windows 10. Not with Visual Studio. See: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/cant-change-default-programs-in-windows-10/229fc3a9-25c9-433b-a333-5806bc5090db
Upvotes: 8
Reputation: 954
On the file you will always open with vs17, click right and choose open with and there choose another app. On win10 it pop out a dialog with some proposals. If vs17 is there, choose your favorite and activate the always open with. then ok and your done.
Upvotes: 2
Reputation: 8163
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.
Upvotes: 7