Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

Overriding Global T4 Templates in ASP.NET MVC Project with Per Project Templates

Thanks to John Meyer for pointing this out in the comments in the previous post.


As mentioned in the notes, you can override the global T4 Templates for Add Controller and Add View in the ASP.NET MVC Framework by importing them into your MVC Project as such.


 



 


This gives you per project T4 Templates as opposed to using the global templates as mentioned before.


Per the notes, make sure you remove the Custom Tool Setting on each template so that Visual Studio won’t try to transform them on the fly and give you a bunch of errors.


 



 


Nice option!


 


David Hayden


 


Tagged: T4 Templates, Code Generation

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>