我正在“在未引用的程序集中定义".建立我的C#专案时发生错误,如何解决? [英] I am getting "defined in an assembly that is not referenced" errors when building my c# project, how to solve it?

查看:63
本文介绍了我正在“在未引用的程序集中定义".建立我的C#专案时发生错误,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有对System和System.Data的引用.

I have already have references to System and System.Data.

1.类型"System.ComponentModel.IListSource"在未引用的程序集中定义.您必须添加对程序集的引用'系统,版本= 2.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089'.

1.The type 'System.ComponentModel.IListSource' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

2.类型'System.Data.Common.DbDataReader'在未引用的程序集中定义.您必须添加对程序集的引用'System.Data,版本= 2.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089'.

2.The type 'System.Data.Common.DbDataReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

3.类型'System.Data.IDataRecord'在未引用的程序集中定义.您必须添加对程序集'System.Data的引用,版本= 2.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089'.

3.The type 'System.Data.IDataRecord' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

4.类型"System.Data.Common.DbConnection"在未引用的程序集中定义.您必须添加对程序集的引用'System.Data,版本= 2.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089'.

4.The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

我已经有对System和System.Data的引用.

I have already have references to System and System.Data.

推荐答案

您需要添加对定义了类型的程序集的引用.添加对程序集的引用;右键单击项目下的参考"节点,然后选择左侧树上的程序集"节点,然后

You need to add references to assemblies where there type are defines. To add reference to an assembly; right click on the Reference nodes under your project and select the assemblies node on the left tree and

  1. 添加对 System.dll 的引用,该引用将在右侧显示为System
  2. 添加对 System.Data.dll 的引用,该引用将在右侧显示为 System.Data
  1. add reference to System.dll, which will show up as System on the right side
  2. add reference to System.Data.dll, which will show up as System.Data on the right side

这篇关于我正在“在未引用的程序集中定义".建立我的C#专案时发生错误,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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