EF Mapping and metadata information could not be found for EntityType Error

后端 未结 13 1637
萌比男神i
萌比男神i 2020-12-05 09:42

I have encountered an exception when I use Entity Framework 4.0 RC. My Entity Framework model is encapsulated in a private assembly who\'s name is Procurement.EFDataProvider

相关标签:
13条回答
  • 2020-12-05 10:20

    There might be another reason. I also pulled my hair for a night.

    I turned out that there is some disorder in the references in the solution. In my project, the edmx belongs to a project called DataAccess.Dll. But I have no reference to it from my exe. From my exe I have a reference to another project called Business.Dll, and this project has a reference for and old location for the DataAccess.DLL.

    Make the following test to see if you have such problem:

    1. Open the bin director of your exe project and keep it visible.
    2. Build the solution.
    3. The first project that will be built is the data access project, and you can see in the bin folder the current time as its modified date.
    4. While other projects are built, you will see that the modified date of the DataAccess project was changed to an old one.

    You need to check your references and to ensure they refer to the update locations of your dlls.

    0 讨论(0)
提交回复
热议问题