0

in my asp.net solution i have created two projects. One is Class Library. First, I have referenced Class Library dll to other project. Now I have added new class into Class Library but cannot see it in the other project. I have removed that reference and added as a new reference but still have the problem. Thanks for your help.

4

2 回答 2

0

也许您在不同的命名空间中添加了新类?例如

namespace Company.Stuff
{
   class Controller
   {
      //...
   }
}

在这种情况下,添加项目引用后,您需要导入命名空间。例如

using Company.Stuff;

class AnotherClass
{
   var controller = new Controller();
   //...
}
于 2013-11-14T01:06:10.057 回答
0

最好的方法是做一个项目参考。在这种情况下,您不需要每次都重新构建或重新引用 DLL,并且每次都将构建另一个项目。

请注意,这是假设它们在同一个解决方案中。

于 2013-11-14T01:06:37.230 回答