简体   繁体   English

Visual Studio 2010中不存在System.Data

[英]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.

相关问题 Visual Studio 2015 UNITY 项目中的参考 System.Data - Reference System.Data in Visual Studio 2015 UNITY project OptimisticConcurrencyException在System.Data中不存在 - OptimisticConcurrencyException does not exist in System.Data 停止Visual Studio 2005添加对System.Data和System.XML的引用 - Stop Visual Studio 2005 adding references to System.Data and System.XML 如何在Visual Studio 2015中引用面向.NET Core的System.Data? - How to reference System.Data in Visual Studio 2015 targeting .NET Core? Visual Studio 2013 for Windows空白应用程序模板中缺少System.Data命名空间 - System.Data namespace missing from visual studio 2013 for windows blank app template Visual Studio 2012安装后System.Data程序集绑定失败 - System.Data assembly binding failure after visual studio 2012 installation LINQ to SQL,命名空间“System.Data”中不存在“Linq” - LINQ to SQL, 'Linq' does not exist in the namespace 'System.Data' 命名空间“System.Data”中不存在类型或命名空间名称“Objects” - The type or namespace name 'Objects' does not exist in the namespace 'System.Data' 命名空间“System.Data”中不存在类型或命名空间名称“实体” - The type or namespace name 'Entity' does not exist in the namespace 'System.Data' 类型或名称空间名称“ OracleClient”在名称空间“ System.Data”中不存在 - The type or namespace name 'OracleClient' does not exist in the namespace 'System.Data'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM