我有一个引用使用 Costura/Fody 构建的 .dll 的应用程序,即 dll 嵌入了所有引用。当我运行控制台应用程序时,来自 dll 的引用不会被解包,因此控制台应用程序会抛出一个异常,说缺少 .dll 等,因为它需要这些资源才能运行。即当使用 Costura/Fody 构建时,AssemblyA.dll 会嵌入 MyAssembly.dll。ConsoleAppC 引用并嵌入了 AssemblyA.dll,但也需要 MyAssembly.dll 才能运行。我确实在 ConsoleAppC 中有对 MyAssembly.dll 的引用,以便它可以编译(但 CopyLocal 设置为 false)。我在想,当 AssemblyA.dll 的嵌入式资源被解压缩时,ConsoleAppC 可以使用 MyAssembly.dll 吗?
这不起作用,但我的方案是否以任何方式有效,或者您只能使用来自 ConsoleAppC 的嵌入式资源,而不是嵌入在 AssemblyA.dll 中的资源?
提前感谢您的帮助
麦克风