Controller will not create when adding a new MVC 5 controller with Views using Entity Framework.
The error message is:
The Output window:
Finding the generator 'controller'... Running the generator 'controller'... Attempting to compile the application in memory. Attempting to figure out the EntityFramework metadata for the model and DbContext: 'DayRateEmps' info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager User profile is available. Using 'C:\Users\xxx.yyy\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. Process is terminating due to StackOverflowException.
Rebuild your application and try again. If that doesn't work then your entity model is not working right. In my case my entity model was in another project folder hence i was unable to auto generate any of the controller. So i manually made a controller an empty controller and imported that project and model.