Appendix C. A Code-Generation Add-In

In the case studies in Chapter 9, “Case Study: Generating a Connection String Manager,” and Chapter 10, “Case Study: Generating Validation Code,” I built separate, standalone solutions for each problem. In both instances, a significant part of the case study was devoted to developing the Visual Studio add-in that integrated the code generator into the application. In practice, I don’t actually build my code-generation solutions that way.

Rather than have multiple code-generation solutions that I load into Visual Studio, I have one add-in project with multiple class files. Each class file (e.g., DatabaseUtilities, WebFormUtilities) contains several related code-generation solutions. Because I have only one ...

Get Practical Code Generation in .NET: Covering Visual Studio 2005, 2008, and 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.