相关的C#错误问题 [英] related c# error problem

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

问题描述

请问这是什么错误


类型``KENTCRM._Default''是不明确的:它可能来自程序集``D:\ CRM \ KENTCRM \ KENTCRM \ bin \ KENTCRM.DLL''或来自程序集``D:\ CRM \ KENTCRM \ KENTCRM \ bin \ KENTCRM.Business.DLL''.请在类型名称中显式指定程序集.

guys what is this error


The type ''KENTCRM._Default'' is ambiguous: it could come from assembly ''D:\CRM\KENTCRM\KENTCRM\bin\KENTCRM.DLL'' or from assembly ''D:\CRM\KENTCRM\KENTCRM\bin\KENTCRM.Business.DLL''. Please specify the assembly explicitly in the type name.

推荐答案

这意味着您在两个不同的程序集中对两个不同的类或变量使用了相同的名称.这不是一个大问题-您只需要弄清楚要使用的那个,并完全限定您的引用或从该文件中删除另一个using语句.如果将插入号放在问题参考的名称中,则会在开头显示一条红色的小线.单击它,然后查看出现的下拉列表中的选项.
It means that you have used the same name for two different classes or variables, in two different assemblies. It''s not a major problem - you just have to work out which one you meant to use and either fully qualify your reference or remove the other using statement from that file. If you put the caret in the name of the problem reference, a small red line will appear at the beginning. Click on it, and look at the options in the resulting drop down list.


错误正是它的含义:

编译器找到了2个可以解析为KENTCRM类型的程序集,并且不确定您是哪一个.

解决方案:使用完全限定的类型名是您的use语句.
The error is exactly what it says:

The compiler found 2 assemblies that could resolve to the KENTCRM type and is unsure which one you.

Solution: Use the fully qualified typename is your use statement.


您所收到的错误基本上意味着, KENTCRM._Default 在两个程序集中, KENTCRM.DLLKENTCRM.Business.DLL,因此您需要指定要从其使用KENTCRM._Default的程序集名称.有关参考 [
The error you are getting basically means that, KENTCRM._Default is in two assemblies KENTCRM.DLL and KENTCRM.Business.DLL, hence you need to specify the assembly name from which you want to use KENTCRM._Default. For refer this[^]

hope it helps :)


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

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