This project is read-only.
Project Description
Compile-time C# template engine.


MGutz.TemplateEngine is a lightweight C# template engine using ASP.NET syntax. The MGutz.Gen utility searches a Visual Studio folder for templates having a .csx file extension. Each of the found templates are transformed into C# method(s) and become members of a generated partial class. The partial classes are added to the Visual Studio MSBuild project. Watch the video in the Releases section to see how easy it is.

Who needs CodeSmith when you have the full power of Visual Studio IDE and compile-time templates?!

Working on the MSBuild task which will make this much more seamless.




  • No Run-Time Dependencies
  • Debuggable generated code
  • Simple to understand
  • Understand Views/Controllers folder hierarchy
  • Change Markup Tags
  • No Need to Distribute Templates

Future Enhancements

  • Monorail View
  • MSBuild Task
  • Auto-Generated Web Input Forms
  • VB Support
  • Debug templates
  • Move to ANTLR to better preserve white space (some things are too difficult with regular expressions)

Last edited Aug 7, 2007 at 5:37 AM by mgutz, version 49