Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic AppDomain.AssemblyResolve event handler getting called (Read 2131 times)
Rennie
Full Member
***
Offline


I Love MindFusion!

Posts: 108
Location: Copenhagen, Denmark
Joined: Jul 17th, 2012
AppDomain.AssemblyResolve event handler getting called
May 15th, 2017 at 12:14pm
Print Post  
My program includes an AppDomain.AssemblyResolve event handler due to some historical reasons not related to my usage of MindFusion programs. I recently changed the the logging done by this event handler, and now I've become aware that this event handler is getting called to "resolve" the modules "MindFusion.Common.WinForms&" and "MindFusion.Licensing&".

Is this normal, and I should just ignore it? It has presumably been happening for a long time, and it's first now that I've become aware of it.

I'm using version 6.3.3.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: AppDomain.AssemblyResolve event handler getting called
Reply #1 - May 15th, 2017 at 5:38pm
Print Post  
The call-stack shows this event is raised in the context of methods of same assembly (already loaded), I'm guessing while they try to load an embedded resource -

- using Reflector I'm seeing embedded resources named MindFusion.Common.WinForms$ and MindFusion.Licensing& in Resources section, and the assemblies call assembly.GetManifestResourceStream at some point - these could be leading to the event

- from what I gather in MSDN topics, if an assembly is referenced by partial name the event is raised to let you bind to fully-qualified one, and if the event is not handled / returns null, the .NET framework binds automatically to the already loaded version.

So I guess you can ignore it, and the framework just continues using its already loaded assemblies.
  
Back to top
 
IP Logged
 
Rennie
Full Member
***
Offline


I Love MindFusion!

Posts: 108
Location: Copenhagen, Denmark
Joined: Jul 17th, 2012
Re: AppDomain.AssemblyResolve event handler getting called
Reply #2 - May 15th, 2017 at 10:45pm
Print Post  
OK, thank you very much for taking the time to look into this.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint