I have a t4 template that is outputting to a specified file name. t4 however when run is creating a xx.cs file for each tt file that I have. Within this file is the text “ErrorGeneratingOutput”
Is there a way to prevent this file from being created?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m afraid not, no.
When using one of the mechanisms to create specific files, there will always be a dummy stub file.
Typically I set it to be a text file with
<#@ output extension=”.stub.txt” #>
and put some explanatory text in it to the effect that it’s a placeholder by putting that text as the body of the template. I then set its build action to ‘None’ permanently.
I’m not sure what’s causing the error, but that’s where any error in the rest of your template would get reported typically.