Thoughts, Tips and Tricks on what I'm currently do for a living. Currently most of my spare time is spent on contributing to Akka.NET.

Thursday, September 2, 2010

How to get the Single File Generator sample running

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:

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:

  1. In Solution Explorer, right click on Generator Sample and select the menu item Properties.
  2. On the Debug tab, click the Start external program radio button.
  3. Browse or enter the path to VS 2010, typically:
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
  4. As Command line arguments, enter
    /ranu /rootsuffix Exp
  5. As Working directory, specify the folder for VS2010:
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
  6. Set a break point in the XmlClassGenerator.GenerateCode method.
  7. Press F5 to start debugging.
  8. A new Visual Studio is started.
  9. 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.

No comments:

Post a Comment