ReflectionTypeLoadException during MEF composition
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
I am using a
DirectoryCatalog
in MEF to satisfy imports in my application. However, there are sometimes obfuscated assemblies in the directory that cause aReflectionTypeLoadException
when I try to compose the catalog. I know I can get round it by using a separate directory or by using a search filter on theDirectoryCatalog
but I want a more general way to solve the problem. Is there some way I can handle the exception and allow composition to continue? Or is there another more general solution?Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.