I’ve started developing a CustomTool for Visual Studio 2010. Microsoft has released a sample with documentation on how to implement a Custom Tool. The code can be found here:
http://code.msdn.microsoft.com/SingleFileGenerator
Visual Studio 2010 SDK must be installed.
The documentation states “Rebuild the class library and start running it”. Didn’t work. Got the error message saying a class library cannot be started. To be able to debug this is what I did:
- In Solution Explorer, right click on Generator Sample and select the menu item Properties.
- On the Debug tab, click the Start external program radio button.
- Browse or enter the path to VS 2010, typically:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe - As Command line arguments, enter
/ranu /rootsuffix Exp - As Working directory, specify the folder for VS2010:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe - Set a break point in the XmlClassGenerator.GenerateCode method.
- Press F5 to start debugging.
- A new Visual Studio is started.
- Follow the instructions in the documentation (create a new class library, create an xml file, fill with content, set CustomTool for file) and the break point will be hit.