简体   繁体   中英

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

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?)

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.

有时,当您添加来自 nuget 管理器以外的其他来源的引用(例如:本地来源)时,您需要在将应用程序移动到另一个环境之前验证该引用的 HintPath

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

Upgrading to EF6

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM