VS Custom Tool file’s association
Kzu has an excellent post o how to create a custom tool. One thing that I want to add to that post is that there is a new feature of Visual Studio 2005 that allows us to associate a file extension to a custom tool.
This means that every time we add a new item to a solution with a particular extension the custom tool will be automatically associated with the item, instead of manually adding the association via the properties window.
Steps:
- Open the window registry
- Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Generators\<Language>
Where <Language> is:
{164b10b9-b200-11d0-8c61-00a0c91e29d5} for VBnet
{e6fdf8b0-f3d1-11d4-8576-0002a516ece8} for J#
{fae04ec1-301f-11d3-bf4b-00c04f79efbc} for C#
- Define a new Key with extension to associate (you must prefix the extension with a “.”)
Example: “.foo”
- Specify the data for the default value of that key to the name of the key of the custom tool
When we add a New Item with the ".foo" extension Visual Studio automatically associates the custom tool with it.
Pablo