ASP.Net MVC 2 / EF 4 Reference Issue
Posted
by Eric J.
on Stack Overflow
See other posts from Stack Overflow
or by Eric J.
Published on 2010-06-07T06:58:53Z
Indexed on
2010/06/07
7:02 UTC
Read the original article
Hit count: 268
asp.net-mvc-2
|entity-framework-4
My ASP.Net MVC 2 project references a Domain project where POCO business objects are defined and a Data project where EF 4 POCO persistence is implemented.
Things were running well until I had a little fussiness with my version control provider (rollback to previous version left me with merge conflicts). Now, upon launching the MVC 2 project, I get a runtime error:
The type 'System.Data.Objects.DataClasses.IEntityWithKey' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
However, every project references System.Data.Entity (same version).
If I remove the reference to System.Data.Entity from the MVC 2 project, I get the same message as a compile-time error.
I'm pretty sure something got messed up when I had the version control issue, but really not sure where to look for this one.
© Stack Overflow or respective owner