-
I have two assemblies A.dll and B.dll. I read A.dll, change its methods and then save it. One method "TestA()" has a reference to the method "TestB()" from B.dll and the thing is that I need to change some stuff inside "TestB()". If I just changed it through A.dll and then saved, my changed wouldn't be applied, the old B.dll would be in use. My idea is to save new B_patched.dll and override Domain.AssemblyResolve so that it loads B_patched.dll instead of B.dll. But if I didn't replace an assembly reference inside TestA() from B.dll to B_patched.dll, it wouldn't work, it would still use B.dll. I understand that I could import the right method using
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm not 100% sure on what you're doing, but if I understand correctly the easiest solution in B.dll is to rename directly the assembly reference |
Beta Was this translation helpful? Give feedback.
I'm not 100% sure on what you're doing, but if I understand correctly the easiest solution in B.dll is to rename directly the assembly reference
module.AssemblyReferences[x].Name += " _patched"
, this way all the references like types and methods will be automatically scoped to the_patched
assembly reference.