Quantcast
Channel: Managed Extensibility Framework
Viewing all articles
Browse latest Browse all 265

New Post: MEF with PostSharp

$
0
0

Hi,

I’ve received a response from SharpCrafters support forum that give me a better understanding of what was happening.

As far as I understand MEF loads the assemblies into the LoadFrom binding context and PostSharp looks for the assemblies in the default Load binding context.

I was able to make the error disappear by handling the AppDomain.AssemblyResolve event and look for the assembly in AppDomain.CurrentDomain.GetAssemblies() because the assembly is already loaded, but in a different context.

My question now is why are assemblies loaded by MEF loaded into the LoadFrom context? What side effects can this solution have? Will I have problems if two different MEF extensions have dependencies to different versions of the same assembly by using the default Load context?

Thanks for the help,

Nuno Pereira


Viewing all articles
Browse latest Browse all 265

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>