类型或名称空间名称“ Entity”在名称空间“ System.Data”中不存在 [英] The type or namespace name 'Entity' does not exist in the namespace 'System.Data'

查看:237
本文介绍了类型或名称空间名称“ Entity”在名称空间“ System.Data”中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是WS类,运行应用程序时出现错误:

I'm using WS class and it gave me error when I run the application:

The type or namespace name 'Entity' does not exist in the namespace 'System.Data' 

我引用了 System.Data; System.Data.Entity;
但没有更改。我不断收到错误消息。我在web.config中也有以下一行:

I have a reference to the System.Data; and to System.Data.Entity; But no changes. I keep getting the error. I have also in the web.config the line:

<compilation debug ="true" targetFramework="4.0"/>


推荐答案

感谢大家!
我找到了解决方案。不是我知道为什么,但是我尝试了这个并且成功了!
我只需要添加对以下内容的引用: System.Data.Entity.Design
,而不必编写任何在代码中使用
谢谢!

Thanks every body! I found the solution. not that I understand why but I tried this and it worked! I just had to add a reference to: System.Data.Entity.Design and don't have to write any using in the code. Thanks!

这篇关于类型或名称空间名称“ Entity”在名称空间“ System.Data”中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆