How do you disable T4 Template validation . VS2010 is validating my T4 Template just now on ever part that has '#' (the sharp character).
error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
The error is nonsense. I can even generate code from my templates but I can't run my project because my templates throw error CS1040.
I get this error after installing visual t4, even uninstalling from extensions manager won't work. Installing Visual T4 for VS2010 gave me problems with subsonic templates. disabling and uninstalling didn't help either. I am so disappointed.
The build action of your T4 template has changed. This may happen when you have copied your files from one project to another, or changed it in the properties by accident.
Steps to resolve it:
For some reasons "Build Action" for T4 templates changed to 'compile' just set it back to 'content'
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