Skip to content

Instantly share code, notes, and snippets.

@Kazark
Created April 13, 2015 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kazark/a19af1ee151e8825817c to your computer and use it in GitHub Desktop.
Save Kazark/a19af1ee151e8825817c to your computer and use it in GitHub Desktop.
LINQPad snippet for debugging assembly load problems
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