在运行时修改插件 dll 中的 MSIL

发布于 2024-10-02 03:58:28 字数 143 浏览 1 评论 0原文

我们有一个 .NET 插件机制,但我们的 SDK 尚未冻结,因此我们时不时地进行重大更改。有时,这些仅相当于更改大小写或修复命名约定。

那么,问题;在加载 dll 之前或之后进入 dll 并更改 msil 以便在运行时修复微不足道的 SDK 损坏有多困难?

We have a .NET plug-in mechanism, but our SDK isn't frozen yet so we make breaking changes every now and again. Sometimes these only amount to a change in casing or fixing a naming convention.

So, question; how hard is it to go into a dll before or after it's loaded and change the msil so that trivial SDK breakages can be fixed at runtime?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

空宴 2024-10-09 03:58:28

Cecil 可能会帮助你。

Cecil might help you.

沒落の蓅哖 2024-10-09 03:58:28

加载后总是太晚了。 JIT 编译器很可能已经将方法体转换为机器代码。尤其是在单声道上。 DLL 已被锁定,您无法再破解它。使用分析器很难证明其合理性。

如果这很重要,请利用“编辑+继续”。

It is invariably too late after it is loaded. The JIT compiler would quite likely already have converted the method bodies to machine code. Especially on Mono. The DLL is locked, you can't hack it anymore. Using the profiler is pretty difficult to justify.

Leverage Edit + Continue if this is important.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文