Welcome to MSDN Blogs Sign in | Join | Help

Ravings of a Developer TS

I have been with Microsoft as part of their Develop Platform and Evangelism team since July of 2006. As I go about my day to day, I often stumble across things I want to share out with the community. This is my soap box. I am based out of the Midwest District, so please don't be offended if you see most of the events I post being in Illinois, Indiana and Wisconsin. If you are ever curious if the event will be in a city near you, just ask :)

Syndication

Visual Studio’s Built-In Code Generation Tool

As I was listening to my buddy Clark Sell’s podcast on www.DeveloperSmackdown.com, I heard them talking about a tool that I kept hearing about but never personally used, and honestly didn’t know too much about.  I digress...

 

Ever sit there at your desk, coffee or Dew in hand thinking, “geez, why can’t some of this basic code be automatically generated by the computer using my software factories in the managed language of my choice?”.  Uuhhh, well, you can, and it does!  The Patterns and Practices team and the DSL team have been using it for some time.  The Text Templating Transformation Toolkit (T4) is actually already on your machine if you're using Visual Studio 2008.  Seriously, check it out!  You can also get it by downloading the DSL Toolkit if you're using Visual Studio 2005.

Some of the features of the T4 Editor:
- Available for Visual Studio 2005 and 2008 (Orcas B2)
- Colorization of directives, text blocks and code.
- Intellisense on directives and attribute values.
- Support for multiples host (GAX, DSLTools and Clarius)
- Preview transformation and properties reflection

 

Here are a few articles to help get you up to speed:

Visual Studio T4 Code Generator: http://visualstudiomagazine.com/articles/2009/05/01/visual-studios-t4-code-generation.aspx

Generating Artifacts with Templates: http://msdn.microsoft.com/en-us/library/bb126445.aspx

Jose Escrich Blog Post on T4 Editor: http://weblogs.asp.net/jescrich/archive/2007/06/07/new-t4-template-visual-studio-editor.aspx

Clarius Consulting’s Visual T4 Blog: http://www.visualt4.com/ 

 

Published Thursday, July 16, 2009 9:52 AM by AngelaB

Comments

No Comments

Anonymous comments are disabled
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement  
Page view tracker