需要 ILMerge 提示
我正在尝试将 vintasoft 条形码 sdk 与我的数据访问 dll 合并,但在 ilmerge 后它不起作用。欢迎任何想法,
这里是错误:
IndexOutOfRangeException: Index was outside the bounds of the array.] 2.┌.©(Byte[] param0) in :0 2.┌..cctor() in :0 [TypeInitializationException: The type initializer for '2.┌' threw an exception.] 2.┌.¥Σ() in :0 Vintasoft.Barcode.WriterSettings..cctor() in :0 [TypeInitializationException: The type initializer for 'Vintasoft.Barcode.WriterSettings' threw an exception.] Vintasoft.Barcode.WriterSettings..ctor() in :0 Vintasoft.Barcode.BarcodeWriter..ctor() in :0 _Default.buttonGenerateBarcode_Click(Object sender, EventArgs e) in E:\ILMergeSample\WebBarcodeWriterDemo\QRBarcode.aspx.vb:27 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
提前致谢
I'm trying to merge vintasoft barcode sdk with my data access dll and it's not working after ilmerge. Any ideas are welcome
here is the error:
IndexOutOfRangeException: Index was outside the bounds of the array.] 2.┌.©(Byte[] param0) in :0 2.┌..cctor() in :0 [TypeInitializationException: The type initializer for '2.┌' threw an exception.] 2.┌.¥Σ() in :0 Vintasoft.Barcode.WriterSettings..cctor() in :0 [TypeInitializationException: The type initializer for 'Vintasoft.Barcode.WriterSettings' threw an exception.] Vintasoft.Barcode.WriterSettings..ctor() in :0 Vintasoft.Barcode.BarcodeWriter..ctor() in :0 _Default.buttonGenerateBarcode_Click(Object sender, EventArgs e) in E:\ILMergeSample\WebBarcodeWriterDemo\QRBarcode.aspx.vb:27 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就像莱皮所说,合并混淆的程序集通常会导致问题。
一种替代方法是将有问题的 dll 粘贴到嵌入式资源中,然后使用
我们在 AppDomain 的程序集解析器中按需执行此操作:
我们在其中测试框架正在查找的程序集,并在需要时从嵌入式资源加载它。
Like leppie said, merging obfuscated assemblies usually leads to problems.
One alternative is to stick the offending dll into an embedded resource, and load it from there using
We do it on demand in our AppDomain's assembly resolver:
where we test what assembly the framework is looking for, and if needed load it from the embedded resource.
您正在尝试合并混淆的程序集。机会很大,但根本行不通。
You are trying to merge an obfuscated assembly. Chances are good, it wont work at all.