.T4 script generates .ts file but .ts does not automatically compile

Topics: General
Jan 9, 2013 at 3:53 PM

I've created a T4 script to automatically generate TypeScript classes for the EF 5.0 classes in an .edmx file.  The T4 tech has the ability to recognize when the .edmx has changed and automatically run, creating a new version of the .ts file.  The new .ts file does not automatically compile.  At this point in the early development of TypeScript, I would not expect this sort of functionality, but I was wondering if this behavior could be expected in a final product?

Coordinator
Jan 9, 2013 at 6:32 PM

I'm not familiar with T4 or EF.  How is the TS file being created that you'd expect the compiler to also be automatically run?

Jan 10, 2013 at 3:05 PM
jonturner wrote:

How is the TS file being created that you'd expect the compiler to also be automatically run?


Entity Framework (EF) has a custom tool set for it's design file that will execute an associated T4 template. The T4 template file has a Custom Tool that will transform the template and write the result to an associated .cs file, that is part of the Project. So basically whenever you save the design file (.edmx in EF) it will alter the content of your source file accordingly. This does not happen at compile time.