asp.net-mvcmodel-view-controllerscaffoldingasp.net-mvc-scaffoldingt4scaffolding

Why is my T4 Scaffolding failing without error?


I'm using ASP.NET MVC to build an application. The scaffolding is failing, but is not showing me any output as to why it is failing.

PM> get-scaffolder

Name                                Description                                                                                                                               Package                       
----                                -----------                                                                                                                               -------                       
T4Scaffolding.CustomScaffolder      Creates an entirely new scaffolder with a PS1 script and a T4 template                                                                    T4Scaffolding.Core.VS2015 1...
T4Scaffolding.CustomTemplate        Allows you to modify the T4 template rendered by a scaffolder                                                                             T4Scaffolding.Core.VS2015 1...
BasicModel                          Starts at the Model and Scaffolds everything needed to get the model displayed                                                                                          
Controller                          Enter a description of Controller here                                                                                                                                  
ControllerUnitTest                  Enter a description of ControllerUnitTest here                                                                                                                          
Core                                Enter a description of Core here                                                                                                                                        
EmptyModel                          Scaffold an empty Model                                                                                                                                                 
Module                              Creates default module controller, service, model, view model and views                                                                                                 
Service                             Enter a description of Service here                                                                                                                                     
ServiceUnitTest                     Enter a description of ServiceUnitTest here                                                                                                                             
Validator                           Enter a description of Validator here                                                                                                                                   
ValidatorUnitTest                   Enter a description of ValidatorUnitTest here                                                                                                                           
ViewModel                           Enter a description of ViewModel here                                                                                                                                   


PM> Scaffold CustomScaffolder BlankCanvas
PM> Scaffold CustomScaffolder BlankCanvas -Verbose
Found template 'DefaultPs1Script' at 'C:\Users\R\Source\Repos\Chase Nexus\packages\T4Scaffolding.Core.VS2015.1.0.3\tools\CustomScaffolder\DefaultPs1Script.ps1.t4'
Found template 'DefaultT4Template' at 'C:\Users\R\Source\Repos\Chase Nexus\packages\T4Scaffolding.Core.VS2015.1.0.3\tools\CustomScaffolder\DefaultT4Template.cs.t4'
PM> 

I had it working for a short while last night, but when I booted up this morning, it was broken again. I previously uninstalled the package T4Scaffolding.Core.VS2015, which is the NuGet package which provides the scaffolding that I'm using. The same scaffolders work perfectly on my colleagues' machines.

At this point, no matter which scaffolder I try to use, the output is the same. It does not show any error, but it does not create the files that it should either.

I am using: Visual Studio Enterprise 2015, Microsoft.AspNet.Mvc 5.2.3, EntityFramework 6.1.3


Solution

  • The problem seems to be related to the package T4Scaffolding.Core.VS2015 version 1.0.3.

    To fix this issue, I uninstalled the above package, and installed version 1.0.1.