Created
April 13, 2015 19:13
-
-
Save Kazark/a19af1ee151e8825817c to your computer and use it in GitHub Desktop.
LINQPad snippet for debugging assembly load problems
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
foreach (var assembly in assemblies) { | |
Console.WriteLine("Assembly: {0}", assembly); | |
Console.WriteLine("Framework: {0}", ((System.Runtime.Versioning.TargetFrameworkAttribute)Assembly.LoadFrom(assembly).GetCustomAttributes(typeof(System.Runtime.Versioning.TargetFrameworkAttribute)).First()).FrameworkDisplayName); | |
Console.WriteLine("Runtime: {0}", Assembly.LoadFrom(assembly).ImageRuntimeVersion); | |
Console.WriteLine("Architecture: {0}", AssemblyName.GetAssemblyName(assembly).ProcessorArchitecture); | |
Console.WriteLine(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment