Using Custom File Extension Associations
Menu: Tools -> Options -> Text Editor -> File Extension
Versions: 2008,2010
Published: 8/22/2010
Code: vstipEnv0038
If you have custom file extension you would like to associate with an editing experience. Just go to Tools -> Options -> Text Editor -> File Extension:
Simply put in your extension and the editing experience you want to have when it is opened. In this example, I have a .COOL extension that is associated with the Script Editor:
When I click the "Add" button it adds this information to the overall list:
Notice that you can select any item in the list and modify the extension and/or editor and then click "Apply" to save the changes. Additionally, you can click "Remove" to take any entry out of the list.
Comments
Anonymous
February 26, 2014
why oh why can't I add complex file extensions here? (e.g. ".cs.old", ".cs.txt" etc.) D-'':Anonymous
February 26, 2014
Yeah I think that would be a good enhancement not sure if this feature is getting any updates. ZAnonymous
September 22, 2014
Can I assign somehow my own Text Editor to a specific extension? Let's assume I have my own class implementing the IClassifier interface and providing classification for my extension .ext1. What if the users want .ext2 (or whatever) extensions to use the same classifier. Can it be done in the Visual Studio settings, because I can't add all the extensions hard coded into the code that the users might think off later.