T4MVC cannot generate classes with ErrorGeneratingOutput

My MVC project has used the T4MVC for scaffolding for many years. I made changes to the input parameters for one of my control methods, and for some reason, when I ran the "Run Custom Tool" to get the changes, instead he wrote a T4MVC.cs file with the text "ErrorGeneratingOutput".

I tried to roll back the changes without effect. I also cleaned up and tried to rebuild the project several times, but now there are no classes under T4MVC.tt, and it still fails in the same way when trying to restore everything.

When I try to debug a template ("Debug T4 Template"), it writes the T4MVC.cs file instead of "ErrorDebuggingTemplate".

I also tried updating T4MVC to the latest version on nuget (3.17.4), but that didn't change the behavior at all.

Until this is fixed, I can’t make any changes, since the project now reports thousands of errors (most missing links to the assembly), so I would really like to receive any help in resolving it. Thank.

+4
source share

All Articles