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 am trying to use MVC3 with the Entity framework with Code First, but the code Template generation process in MS Visual Web Developer 2010 - is not detecting my Model in the models folder - giving a message - "No Model classes are available" - although I do have model classes for which I want to create controllers.

The templating option I've selected is "Controller with read/write actions and views using the Entity Framework".

I've uninstalled and reinstalled Web Developer 2010, but still having the same error.

Anyone know how I can get around this error?

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

Accepted Answer

xixonia's response worked for me. All I needed to do was build/rebuild the project and then everything worked as expected.

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

Popular Answer

Rebuild all did not fix this issue for me... until I closed Studio, reopened and rebuilt all. Then it worked like a charm.



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