Design-time T4 templates in ASP.NET 5 (VS 2015)

前端 未结 3 512
旧巷少年郎
旧巷少年郎 2021-01-06 10:35

I can\'t seem to find a way to make T4 templates in VS 2015 RTM, in an ASP.NET 5 (vNext) project.

I even installed the T4 toolbox for Visual Studio 2015 extension, b

3条回答
  •  星月不相逢
    2021-01-06 11:21

    The ASP.Net 5 (vnext) project is a completely new animal and technically still in beta, its not scheduled for RC til November 2015. Also it's attempting to be completely cross platform so initially the team favored using razor templates instead of T4 for scaffolding. They had no plans to support T4 (or any single file generators) at all until an out cry from the community made them change their mind. According to that thread they will support it but have given no dates. They do seem to have made progress, back in January when I was testing my T4 extension I had issues with the project file(now in json format) not supporting custom properties but as of the release on 7/20/2015 it seems to work now. The engine for running T4 inside of visual studio 2015 is still there so you can use it if you like from other project types. You can create a console app and have it store the T4 files but generate them in the vnext project. If you want a cleaner solution you can also try out my extension T4 Awesome, it gives you a way to organize and call your templates via right click menus.

提交回复
热议问题