在不构建项目的情况下创建 DLL

Create DLL without building project

我有两个申请

工作结构

当我构建子应用程序时,它显示错误:Could not Find namespace MyDll. Are you missing an assembly reference?

代码

1。家长申请

using MyDll;
namesapace MyNamespace
{
   class ParentApplication
   {

   }
}

2。子应用程序

using MyDll;
namesapace ChildNamespace
{
   class ChildApplication
   {

   }
}

如何在不构建子应用程序项目的情况下生成 DLL 子应用程序?

您需要构建子应用程序,因为在代码被编译成 dll 之前,它只是屏幕上的代码。因为,C#被编译成Microsoft Intermediate Language MISL which is then compiled against the common language run time (CLR) and then that is made to native code like machine code. Where you can read more about here。 所以简而言之,您必须构建子应用程序,别无他法。

您似乎还没有为 MyDll.dll 使用正确的位置,它究竟位于何处?