CodeSmith is a code generation tool. You create templates that specify the code to generate, and add properties (such as class name, namespace, etc.) to the template to further customize the output. It gets even better – you can even use most the functionality of the .NET base class library as well. For ASP.NET developers, the template syntax is apparently very similar to this, so it shouldn’t be hard to pick up at all (I don’t know ASP.NET, and I didn’t have any problems). The CodeSmith UI is also very similar to Visual Studio, as well.

While CodeSmith is freeware, there is a professional version. The only differences between the two versions that I could find are that you can’t edit templates in the free version (they’re just text files, so this is no big deal), and with the professional version you have the ability to integrate the CodeSmith engine into your own applications.

In about ten minutes, I was able to generate a template that will create a strongly-typed collection. Since every single collection that I create has exactly the same code in it (aside from the type of the object being stored), this is a huge timesaver. It boggles the mind to think about what exactly can be done with this tool.

The only downside of CodeSmith is that isn’t integrated into Visual Studio. That’s not a very big deal though, I’m more than willing to put with that.

Via Duncan Mackenzie.

Share and Enjoy

  • StumbleUpon
  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • TwitThis

Related posts:

DataSet Visualizer for Visual Studio 2003
Latest Forever Geek Entries on your Site
Create Elegant Code with Anonymous Methods, Iterators, and Partial Classes
The Problem with IDEs
XSLT Intellisense for Visual Studio .NET

Hope you like that post!

Forever Geek is a resource for all things geek. You can stay tuned by having the latest FG news delivered to you for free via RSS.