0

I have 2 VS solutions.

The first solution has a WebUI project in .Net 4.5.2 and a Domain project also in .Net 4.5.2. The WebUI depends on the Domain and holds a reference to it. The Domain builds first. Everything works.

The second solution has a WebUI project in .Net 4.6. I "added" the Domain project from the first solution here (by clicking right mouse on my solution name --> Add --> Existing project).

I added a reference here also and the Domain builds before the WebUI just as in my first solution. Things work correct, for example, I can create a viewmodel in my WebUI and reference to a domain class. I can also acces the domain classes after using an import statement in my controllers. See second pic where I use the person class and contact class. This all works fine. I have some issues however.

In the WebUi's when I want to generate a mvc5 controller using entity framework in my first solution I see in the model class dropdown list my domain entities. enter image description here

However, I don't see these entities(Domain.DbEntities) in my second solution in the dropdown, which I find very strange since I can acces the domain entities from whitin code-files which you can see in de background(i.e. 'person' and 'contact' in my EditPerson(int id) action method enter image description here

Anybody an idea why?

Kip ei
  • 479
  • 6
  • 20
  • This is Visual Studio Intellisense. It is intelligent enough to know which models it can create controllers for with EF . It is not a bug. It simply means Domain.DbEntities cannot be used here – Julius Depulla Dec 01 '15 at 23:48

1 Answers1

0

Maybe the different framework version is the problem. Have you build the project already?

See also: Add Controller Model Classes not shown

Community
  • 1
  • 1
Arjan Blok
  • 49
  • 6