Process your T4 files right from Visual Studio Code.
We had been missing this feature of parsing T4 template to easily generate code from VS Code.
T4 template parser is a text transformation utility created by Microsoft and has been available in Visual Studio since 2008. We have extensively used this utility to generate most of the repeatable code like POCO, Data Access Object, Stub Services, Stub Unit Tests etc.
Requirements
This Extension requires TextTransform.exe file. This is shipped with Microsoft Visual Studio
Default location of TextTransform.exe is C:\Program Files (x86)\Common Files\microsoft shared\TextTemplating\<version>\TextTransform.exe
If, you have TextTransform.exe file at some other location other than default, you can configure it's location by adding following Configurations in Settings of Visual Studio Code
You need to open File -> Preferences -> Settings and add path in TTPath. OR You can also add following configuration in settings.json.
You can add following path in configuration.
Note: You can also add ${workspaceFolder} if you want your current open project to be your Solution Directory or you can add any path along with .tt file.
Run T4 file at configured path.
Open Command Pallete(Ctrl+Shift+P)
Type and select "Run T4 at Configured Path"
Process file at any other location
Open Command Pallete(Ctrl+Shift+P).
Type and select "Run T4 at Different location"
Select .tt file to process from File Browser Dialog.
Logs
You can find TT-Logs.txt file in your Documents Directory of Current System User. All processing failure logs are written over there.