Search code examples
c#f#mygeneration

Is it possible to write MyGeneration Templates in F# and how?


I want to write a MyGeneration Template File in F#. I know you can target various languages etc VB.NET and C# however for my own selfish benefit I would like to write it in F#.

Anyone one if and how this is possible?


Solution

  • In visual studio you can use T4 templating to generate any type of output using a psudo "asp classic" style syntax, where you intermix your code (F#) and the "output."

    Heres a good place to get started: http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx