Suzanne Cook's .NET CLR Notes

Common Language Runtime Developer

  • Suzanne Cook's .NET CLR Notes

    Determining an Image’s CLR Version

    • 11 Comments
    To get it programmatically, from managed code, use Assembly.ImageRuntimeVersion. From unmanaged, use mscoree.dll's GetFileVersion(). (From the command line, starting in v2.0, ildasm.exe will show it if you double-click on "MANIFEST" and look for "Metadata...
  • Suzanne Cook's .NET CLR Notes

    LoadFrom's Second Bind

    • 2 Comments
    Pre-v2, when you load an assembly by path through Fusion (LoadFrom(), ExecuteAssembly(), etc.), it can actually cause two binds, not just one. The first bind loads the file at the given path. If that is successful, another bind is done with the display...
  • Suzanne Cook's .NET CLR Notes

    Using Type.GetType(typeName)

    • 5 Comments
    If no assembly is specified, Type.GetType() will only look in the calling assembly and then mscorlib.dll for the type. For it to look in any other assembly, you need to give the Type.AssemblyQualifiedName for the type. For example: Type.GetType("System...
  • Suzanne Cook's .NET CLR Notes

    Determining the Referencing Assembly

    • 2 Comments
    Say you're debugging your application and you see that version 1.0 of an assembly is being loaded when you thought it should be version 2.0. Where is the reference to 1.0 coming from? The easiest way to find out is to look at the Fusion log for this...
  • Suzanne Cook's .NET CLR Notes

    Binding to .NET Frameworks Assemblies

    • 3 Comments
    By "Frameworks assemblies," I mean the assemblies that ship with the CLR. But, I'm not counting mscorlib.dll , since it's special in a different way. With v1.0 SP3 or later, Frameworks assemblies are unified. That means that the version of those assemblies...
Page 2 of 2 (30 items) 12