我创建了一个名为“图像处理”的Windows窗体(C#)应用程序。 它使用了许多外部dll,所以我决定使用ILMerge将它们合并到一个exe文件中并且它可以工作。 但今天我已经本地化了我的应用程序。 在构建之后,我在Debug文件夹中有3个新文件夹:“en-US”,“ru-RU”,“uk-UA”,其中一个dll具有相同的名称“ImageProcessing.resources.dll”。 所以我在ILMerge命令中包含了所有这些:
ILMerge.exe /t:winexe /out:ImageProcessingRelease.exe ImageProcessing.exe AForge.dll AForge.Imaging.dll AForge.Math.dll DevExpress.Data.v10.2.dll DevExpress.Utils.v10.2.dll DevExpress.XtraBars.v10.2.dll DevExpress.XtraEditors.v10.2.dll FreeImageNET.dll uk-UA\ImageProcessing.resources.dll ru-RU\ImageProcessing.resources.dll en-US\ImageProcessing.resources.dll我的程序在设置中存储语言区域设置。 合并后我无法改变语言,但设置正在发生变化。
我不知道我还能在这里提供更多细节,请告诉我什么。
I've created a Windows Forms (C#) application called "Image Processing". It uses many external dlls so I decided to use ILMerge to merge all of them into one exe file and it worked. But today I've localized my application. After building I had 3 new folders in Debug folder: "en-US", "ru-RU", "uk-UA" with one dll with the same name "ImageProcessing.resources.dll". So I included all of them in a ILMerge command:
ILMerge.exe /t:winexe /out:ImageProcessingRelease.exe ImageProcessing.exe AForge.dll AForge.Imaging.dll AForge.Math.dll DevExpress.Data.v10.2.dll DevExpress.Utils.v10.2.dll DevExpress.XtraBars.v10.2.dll DevExpress.XtraEditors.v10.2.dll FreeImageNET.dll uk-UA\ImageProcessing.resources.dll ru-RU\ImageProcessing.resources.dll en-US\ImageProcessing.resources.dllMy program stores language locale in settings. After merging I can't change language, but settings are changing.
I don't know what else I can include here for more details so tell me please what.
最满意答案
答案很简单。 ILMerge不适用于这种情况,因为.NET Framework依赖于文件夹结构来确定要使用的资源文件。
以这种方式组合程序集是没有意义的,并且某些第三方程序集供应商的最终用户许可证不允许您将其产品与您自己的程序集合并。
The answer is simple. ILMerge is not suitable in this case, as .NET Framework relies on the folder structure to determine which resource file to use.
It is meaningless to combine assemblies in that way, and some third party assembly vendor's end user license does not permit you to merge their product with your own assemblies.
更多推荐
发布评论