简体   繁体   中英

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

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.

I have seen other threads similar to mine, such as this , but it isn't directly related to just system.data. It's trying to add a namespace beyond data, so there system.data namespace isn't the problem. Haven't seen any threads only related to just the system.data namespace. 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程序集的引用在您的项目中?

Have you a reference to syste.data under your references folder in solution explorer window? 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.

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