我的项目中有不明确的类的问题 [英] Problem with ambiguous classes in my project

查看:77
本文介绍了我的项目中有不明确的类的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个为我的项目编写的CustomControls。但是,当我尝试编译时,我收到了以下警告&错误:


警告32无法解析此引用。无法找到程序集

" nathansokalski_com_test,Version = 1.0.0.0,Culture = neutral,

processorArchitecture = MSIL"。检查以确保程序集存在于磁盘上。

如果您的代码需要此引用,则可能会出现编译错误。

nathansokalski_com_test


我的所有课程/ CustomControls都收到以下错误:


错误33''菜单''在名称空间''nathansokalski_com_test'中不明确。


我所有的类/ CustomControl都在同一个Project中,因此

在同一个程序集中。为什么会这样?有没有办法找到

,其中每一个都不明确的是什么?

-

Nathan Sokalski nj********@hotmail.com
http://www.nathansokalski.com/

解决方案

检查引用附近是否有警告标记。检查路径

的参考是指正确的dll,并且它应该在

的位置。


检查你的导入/使用声明是正确的。


" Nathan Sokalski" < nj ******** @ hotmail.comwrote in message

news:Ob ************** @ TK2MSFTNGP05.phx.gbl .. 。


>我有几个为我的项目编写的CustomControls。但是,当我尝试编译时,我收到以下警告&错误:


警告32无法解析此引用。无法找到程序集

" nathansokalski_com_test,Version = 1.0.0.0,Culture = neutral,

processorArchitecture = MSIL"。检查以确保组件存在于

磁盘上。如果您的代码需要此引用,您可能会收到编译

错误。 nathansokalski_com_test


我的所有类/ CustomControls都收到以下错误:


错误33''菜单''在名称空间中不明确''nathansokalski_com_test''。


我所有的类/ CustomControl都在同一个项目中,因此它们在同一个程序集中。为什么会这样?是否有一些

的方式来找出其中每个类别的含义是什么?

-

Nathan Sokalski nj********@hotmail.com
http://www.nathansokalski.com/



引用没有警告标记,路径确实引用了

正确的dll。 dll与我正在编译的dll相同,因为

控件是在该dll中的* .vb文件中创建的。它几乎感觉就像两个同时使用的同一个dll的
副本。还有其他想法吗?

谢谢。

-

Nathan Sokalski
nj ******** @ hotmail.com
http://www.nathansokalski.com/

Just Me < news.microsoft.com写信息

新闻:uq ************** @ TK2MSFTNGP06.phx.gbl ...


检查引用附近是否有警告标记。检查

路径的参考是指正确的dll,并且它出现在

应该是的地方。


检查你的导入/使用声明是正确的。


" Nathan Sokalski" < nj ******** @ hotmail.comwrote in message

news:Ob ************** @ TK2MSFTNGP05.phx.gbl .. 。


>>我有几个为我的项目编写的CustomControls。但是,当我尝试编译时,我收到以下警告&错误:

警告32无法解析此引用。无法找到
程序集nathansokalski_com_test,Version = 1.0.0.0,Culture = neutral,
processorArchitecture = MSIL。检查以确保组件存在于磁盘上。如果您的代码需要此引用,则可能会出现编译错误。 nathansokalski_com_test

我的所有类/ CustomControls都收到以下错误:

错误33''菜单''在命名空间''nathansokalski_com_test'中是不明确的。 />
我的所有类/ CustomControl都在同一个Project中,因此
属于同一个程序集。为什么会这样?是否有一些方法可以找出其中每个类别的含义是什么?
-
Nathan Sokalski
nj ******** @ hotmail.com
http://www.nathansokalski.com/



2007-12-31,Nathan Sokalski< nj ******** @ hotmail.comwrote:


我有几个CustomControls我为我的项目写过。但是,当我尝试编译时,我收到了以下警告&错误:


警告32无法解析此引用。无法找到程序集

" nathansokalski_com_test,Version = 1.0.0.0,Culture = neutral,

processorArchitecture = MSIL"。检查以确保程序集存在于磁盘上。

如果您的代码需要此引用,则可能会出现编译错误。

nathansokalski_com_test


我的所有课程/ CustomControls都收到以下错误:


错误33''菜单''在命名空间''nathansokalski_com_test'中不明确。



嗯,问题很可能就是你有一个名为menu的类,并且

中有一个Imports System.Windows.Forms文件。在这些情况下,

编译器无法判断你的意思是System.Windows.Forms.Menu还是

nathansokalski_com_test.Menu。


要解决这个问题,您可能需要完全限定所有名称...换句话说,

而不是:


Dim m as menu


您可能需要说:


dim m as nathansokalaski_com_test.Menu


HTH


-

Tom Shelton


I have several CustomControls that I have written for my project. However,
when I try to compile I recieve the following warning & errors:

Warning 32 Could not resolve this reference. Could not locate the assembly
"nathansokalski_com_test, Version=1.0.0.0, Culture=neutral,
processorArchitecture=MSIL". Check to make sure the assembly exists on disk.
If this reference is required by your code, you may get compilation errors.
nathansokalski_com_test

I receive the following error for all of my classes/CustomControls:

Error 33 ''Menu'' is ambiguous in the namespace ''nathansokalski_com_test''.

All of my classes/CustomControls are in the same Project, and are therefore
are in the same assembly. Why is this happening? Is there some way to find
out what the other class each of these is ambiguous with is?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

解决方案

check that the reference has not got a warning mark near it. Check the path
for the reference refers to the correct dll and is present where it should
be.

Check that ur imports/using statements are correct.


"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:Ob**************@TK2MSFTNGP05.phx.gbl...

>I have several CustomControls that I have written for my project. However,
when I try to compile I recieve the following warning & errors:

Warning 32 Could not resolve this reference. Could not locate the assembly
"nathansokalski_com_test, Version=1.0.0.0, Culture=neutral,
processorArchitecture=MSIL". Check to make sure the assembly exists on
disk. If this reference is required by your code, you may get compilation
errors. nathansokalski_com_test

I receive the following error for all of my classes/CustomControls:

Error 33 ''Menu'' is ambiguous in the namespace ''nathansokalski_com_test''.

All of my classes/CustomControls are in the same Project, and are
therefore are in the same assembly. Why is this happening? Is there some
way to find out what the other class each of these is ambiguous with is?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/



The reference does not have a warning mark, and the path does refer to the
correct dll. The dll is the same dll that I am compiling, because the
controls are created in *.vb files in that dll. It almost feels like two
copies of the same dll are being used at the same time. Any other ideas?
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Just Me" <news.microsoft.comwrote in message
news:uq**************@TK2MSFTNGP06.phx.gbl...

check that the reference has not got a warning mark near it. Check the
path for the reference refers to the correct dll and is present where it
should be.

Check that ur imports/using statements are correct.


"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:Ob**************@TK2MSFTNGP05.phx.gbl...

>>I have several CustomControls that I have written for my project. However,
when I try to compile I recieve the following warning & errors:

Warning 32 Could not resolve this reference. Could not locate the
assembly "nathansokalski_com_test, Version=1.0.0.0, Culture=neutral,
processorArchitecture=MSIL". Check to make sure the assembly exists on
disk. If this reference is required by your code, you may get compilation
errors. nathansokalski_com_test

I receive the following error for all of my classes/CustomControls:

Error 33 ''Menu'' is ambiguous in the namespace ''nathansokalski_com_test''.

All of my classes/CustomControls are in the same Project, and are
therefore are in the same assembly. Why is this happening? Is there some
way to find out what the other class each of these is ambiguous with is?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/




On 2007-12-31, Nathan Sokalski <nj********@hotmail.comwrote:

I have several CustomControls that I have written for my project. However,
when I try to compile I recieve the following warning & errors:

Warning 32 Could not resolve this reference. Could not locate the assembly
"nathansokalski_com_test, Version=1.0.0.0, Culture=neutral,
processorArchitecture=MSIL". Check to make sure the assembly exists on disk.
If this reference is required by your code, you may get compilation errors.
nathansokalski_com_test

I receive the following error for all of my classes/CustomControls:

Error 33 ''Menu'' is ambiguous in the namespace ''nathansokalski_com_test''.

Well, the problem is most likely that you have a class called menu, and
have an Imports System.Windows.Forms in the file. In those cases, the
compiler can''t tell if you mean System.Windows.Forms.Menu or
nathansokalski_com_test.Menu.

To fix it you may have to fully qualify all the names... In other words,
instead of:

Dim m as menu

You might need to to say:

dim m as nathansokalaski_com_test.Menu

HTH

--
Tom Shelton


这篇关于我的项目中有不明确的类的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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