Chapter 8. Other Tools: Templates, Attributes, and Custom Tools

The tools covered so far have been dedicated to supporting Visual Studio or generating/modifying code. However, three more tools, more general purpose in nature, should also be part of your code-generation toolkit: templates, attributes, and custom tools.

Templates are useful because on many occasions the code you add to a solution is boilerplate: The code is virtually identical from one solution to another. Even when a solution’s detailed code is different for every generation, the overall structure of the solution usually doesn’t change. For instance, the code in the ...

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.