在C#中出现编译错误 [英] Having Compiling error in C#

查看:128
本文介绍了在C#中出现编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在编译代码时遇到以下错误.谁知道为什么?

引用不明确
引用不明确

无法解析符号执行阅读器"
无法解析符号命令类型"
无法解析符号已读"
无法解析符号打开"
无法解析符号关闭"
无法解析符号"dispose"

I''m having the following errors when i compile my code. Any one knows why?

Ambiguous reference
Ambiguous reference

cannot resolve symbol ''execute reader''
cannot resolve symbol ''comand type''
cannot resolve symbol ''read''
cannot resolve symbol ''open''
cannot resolve symbol ''close''
cannot resolve symbol ''dispose''

推荐答案

您的项目(和/或您引用的程序集)包含两个具有相同名称(和名称空间)的类.该错误消息将告诉您两个模棱两可的引用的全限定名称.解决此问题,您的代码将被编译.
Your project (and/or your referenced assemblies) contains two classes with the same name (and namespace). The error message will tell you the fully qualified names of both the ambiguous references. Resolve the problem and your code will compile.


实际的错误消息是什么?他们应该帮助您解决问题.

您是否两次添加了相同的程序集引用?每个版本的框架一次?

亚历克斯
What are the actual error messages? They should help in solving your issue.

Did you add the same assembly reference twice? Once for each version of the framework?

Alex


这篇关于在C#中出现编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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