Tutorial: Generate seperate files from a T4 Template

When you run the custom tool of a T4 Template, it generates code in a child node of that template. On StackOverflow I have seen a a lot of devs asking how to write to separate files, or even to a different folder. This is actually easy to achieve, and there are multiple possible solutions. … Continue reading Tutorial: Generate seperate files from a T4 Template

T4Editor VS2019 Extension: Syntax highlighting for T4 Templates

Several developers complain about the lack of a proper T4 editor experience, as everything is just shown as plain text. See my other T4 tutorials to see the regular T4 text files in the header image. I created a Visual Studio extension called T4Editor that adds colors to different blocks in you code. You can … Continue reading T4Editor VS2019 Extension: Syntax highlighting for T4 Templates

T4Executer VS2019 Extension

Visual Studio 2019 released earlier this week. When I build my experimental TexTran project, I noticed none of the T4 Templates were executed. I used AutoT4 in the past (a VS2012 extension) but this package is not available in the latest 2019 version. I added an extension to the Visual Studio Marketplace called TT4Executer. When … Continue reading T4Executer VS2019 Extension

T4 Beginner Tutorial: Generate C# classes based on text definitions

Introduction T4 stands for Text Template Transformation Toolkit. When you scaffold a controller or view in ASP.NET, in the background T4 Templates that contain those structures are executed and files are generated for you. In this article I will explain how you can generate classes yourself, based on simple definitions in a text file. This … Continue reading T4 Beginner Tutorial: Generate C# classes based on text definitions