I created a T4 text template (.tt
) file in Visual Studio Code, but unlike Visual Studio 2017 (or 2015 ,...) it won't generate the output file after saving the .tt
file. How can I generate the output in Visual Studio Code?
To debug a design-time text template, save the text template file, and then choose Debug T4 Template on the shortcut menu of the file in Solution Explorer. To debug a run-time text template, simply debug the application to which it belongs.
This solution is not exactly what you asked, but it may be useful in many scenarios (on Windows OS only).
You can create a task in Visual Studio Code and run C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\TextTransform.exe
. If you don't have Visual Studio you can copy this file to your project folder and execute it from that location.
Any extension that can run a .exe
file can do the job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With