IL Rewrite无法加载.Net DLL

编程入门 行业动态 更新时间:2024-10-18 12:19:53
本文介绍了IL Rewrite无法加载.Net DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我为一些自定义要求构建了IL重写器。它所做的全是

I have built the IL Rewriter for some custom requirement. All it does is

  • 为另一个.Net DLL(新建的自定义DLL)创建方法引用
  • Inject epilogue&几个必需方法的序言,他们在内部调用上面的方法引用。
  • 样本Windows窗体应用程序的一切正常。但是,对于Web应用程序,结语&序幕正在被正确注入。但是,当它被调用时,它会抛出错误 -

    Everything works fine with sample Windows form application. However, for the web application, epilogue & prologue are getting injected properly. But, when it gets called, it throws below error -

    System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

    不知何故,新建的.Net DLL没有为WebApp加载虽然同样适用于Windows应用程序。

    Somehow, the newly built .Net DLL is not getting loaded for WebApp, while the same is working fine for Windows App.

    如果我禁用IL Rewrite,一切都正常工作。这意味着IL Rewrite导致错误。

    If I disable IL Rewrite, everything works fine as expected. That means IL Rewrite is causing the error.

    任何解决方案都将非常感激

    Any solution would be much appreciated

    Hitesh

    推荐答案

    Hi Hitesh Kesharia,

    Hi Hitesh Kesharia,

    对于您的问题,我发现您的问题已通过以下解决方案自行解决。

    For your question, I found that your question has been solved by yourself with the solution below.

    更改

    COMPLUS_LoaderOptimization

    1

    最好的问候,

    Wendy

    更多推荐

    IL Rewrite无法加载.Net DLL

    本文发布于:2023-11-08 20:17:22,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1570350.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:加载   Rewrite   IL   Net   DLL

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!