Many of you have been using CodeSmith for code generation and loving it. I know when I use my codesmith, I create my template as I like it to be and then I just let it generate my codes. I just love the fact that I can click a button and I have a framework. One dark side if the CodeSmith is that, it is not free. But the cost is nothing compared to what you are getting in return.
You can always do the same thing with "FREE" Microsft T4 templates.
T4 template comes with Visual Studio 2008 and you can also download it for 2005. Visual Studio 2010 has T4 template integrated with it. So there is no reason for not liking it. Once you get the T4 setup correctly, you will love it.
I am going to give you few links that you can use to learn this tool
1. http://www.olegsych.com/2007/12/text-template-transformation-toolkit/
2. href="http://www.hanselman.com/blog/TheBestVisualStudio2010ProductivityPowerToolsPowerCommandsAndExtensions.aspx
3. http://blogs.msdn.com/b/webdevtools/archive/2009/01/29/t4-templates-a-quick-start-guide-for-asp-net-mvc-developers.aspx
Feel free to share your thoughts and anything cool you have done with T4.
Hopefully this helps.
No comments:
Post a Comment