Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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: 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: 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?

share|improve this question

migrated from stackoverflow.com May 26 '13 at 9:22

This question came from our site for professional and enthusiast programmers.

    
Did you tried the registry trick? –  The_aLiEn May 26 '13 at 11:13
    
@The_aLiEn What registry trick? (that's a no :)) –  LordScree Jun 6 '13 at 7:57
1  
In registry you can search for extension and change associated application to which you want. Extension associations are in HKEY_CLASSES_ROOT –  The_aLiEn Jun 6 '13 at 22:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.