简体   繁体   English

ASP.NET 2.0编译错误BC30002:类型未定义

[英]ASP.NET 2.0 Compilation Error BC30002: Type is not defined

First of all, let me explain the situation, I know this is a bit complicated. 首先,让我解释一下情况,我知道这有点复杂。 And I apologize for my poor English. 我为我的英语不好而道歉。

I have created a dll library which contains the classes I created. 我创建了一个dll库,其中包含我创建的类。 I tested the library with Console Application and web site created with Visual Studio 2005, everything works fine. 我使用控制台应用程序和使用Visual Studio 2005创建的网站测试了库,一切正常。

So I copied the dll to the "Bin" folder of a running ASP.NET 2.0 web site, added reference to the dll file, imported the namespace, then trying to initiate instances of objects in the dll. 因此,我将dll复制到正在运行的ASP.NET 2.0网站的“ Bin”文件夹中,添加了对dll文件的引用,导入了名称空间,然后尝试在dll中启动对象的实例。

The following occurred, Compilation Error BC30002: Type is not defined. 发生以下错误,编译错误BC30002:类型未定义。

Same error shows up when I tried to create instances of another object of a new class, which is place in the "App_Code" folder of the same web site. 当我尝试创建一个新类的另一个对象的实例时,会出现相同的错误,该实例位于同一网站的“ App_Code”文件夹中。

On the same web site, I have a third party dll library, I did exactly the same thing for that third party library and it works fine. 在同一个网站上,我有一个第三方dll库,我对该第三方库执行了完全相同的操作,并且工作正常。

I am not sure why my own dll library (in the "Bin" folder) and classes (in the "App_Code" folder) do not work. 我不确定为什么我自己的dll库(在“ Bin”文件夹中)和类(在“ App_Code”文件夹中)不起作用。

Please give me some hints how I can solve the problem. 请给我一些提示,说明我如何解决该问题。

只是一个疯狂的猜测,但是库中的类和App_Code中的类之间可能存在名称空间冲突?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM