ch0pstix 🥢
✅ Modern T4 Replacement for Design Time Codegen
Hey all!
I'm currently working on a library in which I was previously using a T4 template to generate many variants (varying on generic arity) of a struct type. I'm essentially at a point where I would like to rewrite the template for easier maintainability going forward (and to support multi-file output), and was wondering if there might a better option for design time codegen. Especially since T4 seems to be stuck on Framework and the syntax highlighting is very finicky.
One option I did some looking into was utilizing raw string literals and interpolation within a C# script file and running it via
dotnet-script
during a pre-build task, but alas, Rider is yet to add support for .csx files. So, without proper intellisense, diagnostics, and highlighting, it unfortunately doesn't give me a better workflow than I had using T4.6 replies