【发布时间】:2015-04-20 23:23:56
【问题描述】:
我正在使用 ILMerge 将 .ddls 合并到一个可执行文件中,但是当我运行 Output.exe 时,似乎找不到 App.Config 文件。它返回错误:InvalidOperationException:在应用程序配置文件中找不到连接字符串名称。
我想知道 ILMerge 是否在 Output.exe 中包含了 App.Config 文件。
如何不包含它并确保 Output.exe 引用它?
我使用了 ILMerge GUI - 除了 .dll 之外,我没有选择包含任何内容 - 我从 ConsoleApplication 编译到的 bin/Release 文件夹中选择。
这是来自 bin/Debug 文件夹的图像。 ILMerge 没有让我选择包含 ConsoleLayer.vshost.exe.config - 其中包括(基本上) App.Config 文件。如何让它包含它,以便 Output.exe 在运行时知道连接字符串的详细信息?
谢谢。
【问题讨论】:
标签: c# c#-4.0 console-application assemblies ilmerge