[英]System.Data Doesn't Exist in Visual Studio 2010
I have a red line under System.Data saying that "The type or namespace 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)." 我在System.Data下有一条红线,上面写着“类型或名称空间'Data'在名称空间'System'中不存在(您是否缺少程序集引用?)。”
Thought I needed 4.5 .Net Framework, but I have another project that can use the namespace, so it is something with this project that I am using. 以为我需要4.5 .Net Framework,但是我还有另一个可以使用名称空间的项目,所以我正在使用的这个项目就是其中一个。
I have seen other threads similar to mine, such as this , but it isn't directly related to just system.data. 我已经看到了其他类似于我的线程,例如this ,但它不仅与system.data直接相关。 It's trying to add a namespace beyond data, so there system.data namespace isn't the problem.
它试图在数据之外添加名称空间,因此system.data名称空间不是问题。 Haven't seen any threads only related to just the system.data namespace.
还没有看到仅与system.data命名空间相关的任何线程。 Any help would be appreciated.
任何帮助,将不胜感激。
did you try to add the assembly reference in your project? 您是否尝试在项目中添加程序集引用? right click on your project > add reference then select assemblies tab and finally System.Data and check it, then press ok.
右键单击您的项目>添加引用,然后选择“程序集”选项卡,最后选择“ System.Data”并进行检查,然后按“确定”。
您是否检查过以确保对System.Data程序集的引用在您的项目中?
Have you a reference to syste.data under your references folder in solution explorer window? 您在解决方案资源管理器窗口中的references文件夹下是否有对syste.data的引用? If not add it
如果没有添加
check the project configuration : 检查项目配置:
->Right click on Project
->Select Properties
->Change "Target Framework" from ".Net Framework 4.0 Client Profile" to ".Net Framework 4.0"
->now run the Project.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.