a T4 text template is a mixture of text blocks and control logic that can generate a text file.
Can anyone suggest to me T4 alternative in .NET Core?
How can we do code generation?
You could use Scripty. It looks quite nice and fits with the new Analyzers from Roslyn.
http://daveaglick.com/posts/announcing-scripty
https://github.com/daveaglick/Scripty
Since they are dropping the project.json format (https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/) you should be able to use Scripty from the .xproj
or .csproj
file.