Entity Framework scaffolding error with MVC 3 and ASP.Net: There are no model classes available.

asp.net-mvc-3 ef-code-first entity-framework

Question

I'm attempting to use MVC3 with the Entity framework and Code First, but the code template generation process in Microsoft Visual Web Developer 2010 is failing to recognize my model in the models folder and is reporting that "No Model classes are available," despite the fact that I have model classes for which I want to create controllers.

"Controller with read/write actions and views utilizing the Entity Framework" is the template option I've chosen.

Web Developer 2010 has been removed and reinstalled, but I'm still getting the same issue.

Does anybody know how I can avoid this mistake?

1
7
4/16/2011 11:53:01 AM

Accepted Answer

I found xixonia's answer to be helpful. All I had to do was create or rebuild the project, and everything else just worked as it should have.

14
4/17/2011 11:37:11 PM

Popular Answer

I tried rebuilding everything, but it did not work until I shut off Studio, opened it again, and rebuilt all. Then it performed flawlessly.



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