visual-studio-2015asp.net-core-mvcdnxasp.net-mvc-scaffoldingt4scaffolding

Error on executing T4 scaffolfing from EF6 model to views/controller in MVC 6 / DNX project (.xproj)


There is of course no such option as using customizable scaffolding from EF6 model to views/controller in DNX project's in newest MVC 6. But I've tried to use the PM console command Scaffold (aka Invoke-Scaffolder, from T4Scaffolding.Core.1.0.0\tools\T4Scaffolding.dll ) to investigate what custom codegeneration could migrate and what could not.

Scaffold -Scaffolder Controller -Project DemoDnxMvcApp -OverrideTemplateFolders "D:\cot\klik\kk\vse\V1.DnxMvcApp\" -Force Templates

and get an error 'project DemoDnxMvcApp not found'. It seems t4 scaffolder doesn't understand xproj projects, can't process them.

But also I've noticed there is now possibility to create and execute t4 template inside a such project (e.g that could generate TypeScript from EF6 model).

P.S. (beta5 DNX used)


Solution

  • So T4 support in the latest .net is going to be there according to this git hub issue but I don't think it is high on the priority list. I am guessing that they will be pushing yeoman templates since everything else they are doing in DNX now is looking more and more like node.