Feb 3, 2013 at 9:42 AM
Edited Feb 3, 2013 at 9:43 AM
Visual Studio has 3 language in which custom tools are supported. These are defined in the registry under a certain key, the name of the key is what you type under the Custom Tool field in the properties window of Visual Studio. The registry key contains
values that describes the behavior of the custom tool and information that points to which class it should execute.
When the custom tool executes Visual Studio first loads the assembly (from Visual Studio 2012 and possibly all next versions the assembly must be in the GAC), if it can't load the assembly then Visual Studio will display an error message box. Once the assembly
is loaded, it will invoke a method called
and pass the file of which the custom tool was set together with the custom tool namespace (if this is not defined then it passes the default namespace defined in the project file appended with the folder structure in which the file to execute
the custom tool is stored)
The custom tool is executed every time the file is changed or when the user explicitly says "Run custom tool" by right clicking on the file in the solution explorer
I hope that made sense...