体动和动态依赖项更新(AssemblyResolve事件) [英] Fody and dynamic dependency update (AssemblyResolve event)

查看:97
本文介绍了体动和动态依赖项更新(AssemblyResolve事件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个自动更新系统,其中WPF App动态加载其依赖项(dll).我为此使用AssemblyResolve事件.然后我找到了Costura.Fody,并看到它简化了事情.但是,Fody不允许加载依赖项的更新版本,例如,如果我将Fody嵌入了dll v1.0.0.0,但是将从Web服务器加载了v2.0.0.0.

I'm writing an auto-update system, where WPF App loads its dependencies (dlls) dynamically. I'm using the AssemblyResolve event for that. Then I found Costura.Fody and saw that it simplifies things. However, Fody doesn't allow loading of an updated version of a dependency, for example if I have dll v1.0.0.0 embedded with Fody, but would have v2.0.0.0 loaded from the web server.

Fody中是否存在AssemblyResolve事件的钩子,这样我就可以加载我想要的依赖项,而不是Fody知道或建议的依赖项?

Is there a hook in Fody for AssemblyResolve event so that I could then load whichever dependency I want, in stead of what Fody knows, or suggests?

-pom-

推荐答案

不是. Costura被设计为更多的自动系统,在该系统中,它仅负责查找依赖项并自动加载它们.您要做的就是控制该过程并添加自己的逻辑.

Not really. Costura was designed as more of a hands-off system, where it just handles finding the dependencies and loading them automatically. What you want to do is control that process and add your own logic.

这篇关于体动和动态依赖项更新(AssemblyResolve事件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆