You can use BindingRedirect to redirect YourAssembly.dll 1.1.0.0 to 1.2.0.0.
Does anyone know if its possible to do this if the assembly names are different.
E.g.
YourAssembly1.dll (v1.1) redirects to YourAssembly2.dll (v2.8)
You can use BindingRedirect to redirect YourAssembly.dll 1.1.0.0 to 1.2.0.0.
Does anyone know if its possible to do this if the assembly names are different.
E.g.
YourAssembly1.dll (v1.1) redirects to YourAssembly2.dll (v2.8)
If I recall correctly, I did this about 4 years ago using the AppDomain.AssemblyResolve event. The idea is that you get the AssemblyName request and you return an Assembly. In some cases, I was even able to generate DynamicAssembly at runtime and inject that. I forget what effects strong naming has on this.
Use ILDASM and ILASM to decompile, modify, and recompile the original assembly so it references YourAssembly2.dll.
I got the idea in my head and did a couple of searches to verify it's possible. See Is it possible to modify assembly manifests other than by ILDASM/ILASM hacking? and http://forums.asp.net/t/1582934.aspx/1
This should not be possible, due to the fact that your own application has a reference to YourAssembly1
.
When the runtime loads your application it tries to load an assembly YourAssembly1.dll
(applying probing and version redirects) and therefore it cannot load the assembly YourAssembly2
instead.
© 2022 - 2024 — McMap. All rights reserved.