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 installed, in executes all T4 Templates every time you build or rebuild your solution. This is enabled by default, and an be toggled in the Extensions > T4Executer > Enable/Disable menu.

It’s a pretty simple package, that adds an event to the OnBuildBegin event that fetches all .tt files in all active projects and executes them in before building your projects.

This is my first VSIX project, and it’s open for contributions and improvements, the source code can be found here.

Update: I added an options dialog where you can select which templates to ignore. This is found in the Extensions > T4Executer > Ignore Template menu.

Update 2: I a new option where you can specifiy to execute templates before or after build or ignore them. This can be configured via Extensions > T4Executer > Configure.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s