I'm using Windows 8 and I'm trying to make Visual Studio 2012 the default program with which to open my .sql
files.
I have right-clicked on a .sql
file and chosen: Open with... > Choose default program... > More options > Look for another app on this PC. I use the form to open C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
, but I then get the following error:
Cannot associate file type with this program
The program you have selected cannot be associated with this file type. Please choose another program.
I have associated .sql
files with the Microsoft SQL Server Data Tools, T-SQL Editor
under Tools > Options > Text Editor > File Extension. However, I believe this is just for syntax highlighting.
Whilst looking for a solution, I found this SO.SE question: https://stackoverflow.com/questions/7471739/how-to-add-a-new-file-association-to-visual-studio. However, I'm hoping for a solution that does not involve using a third-party program.
I also found this SO.SE question: https://stackoverflow.com/questions/15996907/reassociate-files-types-for-visual-studio-2012. However, I don't see .sql
in the list of available file extensions.
Is it possible to set Visual Studio 2012 as the default editor for .sql files and, if it is, how can this be achieved on Windows 8?