Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There was an error running the selected code generator: 'Object reference not set to an instance of an object.' Error?

enter image description here

I have tried all the solution like repairing the VS 2013 but no use. when you create a controller by right clicking on the Controller folder and you add the controller, then you right click in the Action of the newly created controller and select Add View, it happens right then, when I try to create a view. Its not a new project, its an existing project.

like image 861
Akashkumar Bammrotwar Avatar asked Aug 24 '16 15:08

Akashkumar Bammrotwar


1 Answers

For me the error had to do with the fact that I had a project in my solution that was a .NET Core project library and was referenced in the project that housed the DbContext.

Removing - or I guess changing the type - the .NET core library resolved the issue

like image 127
Timo Hermans Avatar answered Sep 24 '22 04:09

Timo Hermans