Fody and dynamic dependency update (AssemblyResolv

2019-09-18 01:23发布

问题:

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.

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-

回答1:

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.