Add T4 support
There is no any code generation solution except of Razor, but it's coupled with web context. Add T4 support for code generation.
I assume by T4 you mean Text Template Transformation Toolkit
While it sounds like useful idea, it feels out of scope of CoreFX repo. It also looks like larger, non-trivial work. I would suggest you to look for existing solutions and OSS projects.
Honestly I'd prefer RazorTransorm as decoupled part of existing Razor Engine which takes text template with transformation model, understands @ as output and including (partial). Just thoughts. Thank you!
@karelz this looks need to move to the sdk repro. agree?
Why SDK? I was about to suggest Razor repo ... (I hope there is one)
the request is to have code generation template can be used in VS. this is why I suggested SDK repo.
Isn't VS just one of many users of such component? Or am I missing something?
I am not sure the request is for VS only or not. I have no problem to move this to Razor as you suggested. anyway, this doesn't belong to corefx.
@karelz do you know the exact Razor repo we can move the issue to?
Quick internet search result: https://github.com/aspnet/Razor
I saw that, but this repo is specific to CSHTML. I don't think this is the right place.
IMO it is where Razor code lives. If there is request to decouple its component and generalize it to multi-purpose, it should be there as the closest place to the source code IMO. The other option is to fork entirely right away ... which would be starting brand new OSS project.
I think the Razor request (decoupling, etc.) is not necessarily tied to the T4 request. Is that right, @sergiyd ?
From what I understand, the T4 engine has historically been a part of Visual Studio, and maintained by that team. I'm not sure if there's active development on it at the moment.
@sergiyd you should make it clearer what exactly you would like to do.
T4 engine was tightly coupled with IDE. Microsoft's Visual Studio T4 implementation I think is not yet open sourced, so you probably could not reuse it easily in .NET Core.
MonoDevelop has their open source T4 clone for years, and if you like you can extract the goodies.
There are many third party options, such as ANTLR's StringTemplate (.NET Standard 1.3 compliant). They are also popularly used.
@mellinoe @lextm as I understand T4 is separate utility which is well integrated in VS. Since Razor is already implemented in NET Core rather "reassign" this topic to https://github.com/aspnet/Razor. I'm going to try StringTemplate for now. Thanks!
Closing it per the discussions result.