VS2017 not showing MVC Controller with view using Entity Framework

asp.net-core-mvc c# entity-framework-core visual-studio-2017

Question

I created a normal ASP.NET web application and adding MVC to it manually as I think this is the best way to learn MVC design pattern.

I have created a model and now I am trying to create the controller for that model by right-clicking in the Controller folder > Add > Controller however, not seeing option for "MVC Controller with Views using Entity Framework".

Here's what I have already done:

  1. Added NuGet Package in my solution
  2. Searched other questions that may help but none did.

UPDATE WITH MORE INFORMATION:

The Nuget package I have installed is Microsoft.AspNetCore.Mvc. The problem is that I need to add MVC Controller with views using Entity Framework however, it's not in the list of Controller's folder > Add > Controller

1
1
3/10/2019 7:16:59 AM

Popular Answer

I run into same issue today and the way to fix it was to simply:

move / delete Pages folder from project main directory.

Once you remove the folder you can scaffold the controller with "MVC Controller with view using Entity Framework" option again. This issue was reported a while ago and was supposed to be fixed but seems to still occur as end of May 2019

10
5/31/2019 9:22:35 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow