T4 is the \"official\" code generation engine for C#/VB.NET. But F# doesn\'t support it (this is from April, but I couldn\'t find any newer mentions). So what is a good way to g
It depends what your trying to do. While it's an approach that's not really suitable for generating templates in the way many T4 examples show, in general I would recommend designing a "combinators library" [1] for code generation or language oriented programming tasks in F#. The idea is to design some combinators to represent the code you're try to generate, generating F# source text from combinators, then compiling this via the code DOM.
However often it would be easier simply to write an interpreter for your combinators rather than generating code.
Good examples of combinators in F# are:
[1] http://en.wikipedia.org/wiki/Combinator_library