I’m trying to use T4 in VS2010, but I have a weird problem. T4 always shows error message “A directive was specified in the wrong format”, although all directives are in correct format. It turned out this error was caused by a UTF-8 file prefix, which is not recognized by T4. Okay, I have to remove it. But every time I’m trying to save this file to ANSI encoding with an external editor, VS2010 changes it’s encoding back to UTF-8. And the same when I modify file in VS2010. So T4 doesn’t work again.
Any suggestions?
I’m trying to use T4 in VS2010, but I have a weird problem. T4
Share
I’ve found the reason, it had nothing to do with encoding, my bad. I copied some text from a sample, and it had wrong symbol for quotation mark (looking very similar visually, but having different char code). That made T4 parser fail.