Working with Documents in Microsoft Visual Studio

  • 8/24/2011

04.13 Using Custom File Extension Associations

WINDOWS

Alt,T, O

MENU

Tools | Options | Text Editor | File Extension

COMMAND

Tools.Options

VERSIONS

2005, 2008, 2010

CODE

vstipEnv0038

If you have a custom file extension that you would like to associate with an editing experience, just go to Tools | Options | Text Editor | File Extension to see the options shown in the following illustration.

Simply type in your extension and the editing experience you want to have when it is opened. In the following example, I have a .cool extension that is associated with the Script Editor:

httpatomoreillycomsourcemspimages899246.png

When I click Add, as shown in the preceding illustration, the following information is added to the overall list:

httpatomoreillycomsourcemspimages899248.png

Notice that you can select any item in the list, 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.