I attended the Silicon Valley Code Camp this past weekend and presented a session on Code Generation techniques using Visual Studio 2010. I’d like to thank everyone that attended the session and as promised you can download the presentation and code from Windows Live SkyDrive.

Within the Visual Studio 2010 solution you’ll find sample code that demonstrates code generation using the following techniques; although the Visual Studio Code Snippets and Visual Studio Project & Item Templates can be downloaded from the CodePlex website.

  1. StringBuilder (msdn documentation)
  2. System.CodeDom (msdn documentation)
  3. Visual Studio Code Snippets (download)
  4. XSLT
  5. Visual Studio Project & Item Templates (download coming soon) (current check-in)
  6. Text Template Transformation Toolkit (T4) (msdn documentation)
  7. Entity Framework 4.0 & T4 Templates
  8. Visual Studio 2010 UML & T4 Templates
  9. SQL Server 2008 R2 Management Objects