Last active
May 27, 2018 06:48
-
-
Save jonihietala/bc02d0dc2343d5bf3aed405ab7cf2296 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/4667078/how-to-retrieve-the-loaderexception-property | |
try | |
{ | |
foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) | |
{ | |
asm.GetTypes(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
if (ex is System.Reflection.ReflectionTypeLoadException) | |
{ | |
var typeLoadException = ex as ReflectionTypeLoadException; | |
var loaderExceptions = typeLoadException.LoaderExceptions; // Breakpoint | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment