This is a Visual Studio 2012+ extension which automatically triggers all T4 templates in your solution (or selected project for project-only builds) to be re-run before build.
Just build and install the template using the VSIX file, grab it from the Visual Studio gallery or do it the easy way and use the 'Extension & Updates' manager in Visual Studio 2012+.
By default, the extension will run all of your T4 templates on build. If that's what you want, great -- zero configuration required.
If you want to customize the behaviour, you have two options:
.tt
file in your solution. Whatever you specify here will take precedence over the default in the options dialog (unless you select "Default"). Note: this option is not available for T4 templates in a new NET Core or NET Standard project.