The type or namespace name 'Core' does not exist in the namespace

孤者浪人 提交于 2020-01-03 18:04:12

问题


I encounter this kind of error when I debug a project I already have EntityFramework.dll, System.Core.dll, System.Data.Entity but still Core is not referenced.

Can someone help me?

I'm having error in this Line

using System.Data.Entity.Core.Objects;

This is the error:

The type or namespace name 'Core' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?)


回答1:


Enrique, I had this problem crop up when I started opening a project on my desktop that I had normally been opening on my VM. Masoud's answer is not helpful... I don't think he read your original post.

What I did to clear this compile error up was to open NuGet package manager and install the update that was available for EntityFramework. I had version 6.1.1 installed in the project and I upgraded to 6.1.3. I should not have had the error to start with, but upgrading the version appeared to jiggle whatever it was loose because I started compiling fine after that.




回答2:


If you want use EF6, use namespace System.Data.Entity.Core instead, and try again.

Upgrading to EF6



来源:https://stackoverflow.com/questions/26092188/the-type-or-namespace-name-core-does-not-exist-in-the-namespace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!