Satellite assembly and AssemblyResolve event

In .Net framework, CLR will not raise AssemblyResolve event for missing satellite assemblies (to be precise, Resource Manager asks CLR loader to not raise AssemblyResolve event if it can’t find a satellite assembly.). The reason is that Resource Manager has many by-design assembly loading failures. It will unnecessarily flood the AssemblyResolve event handler to raise…


Parent Assembly Hint

When an assembly load is request, the assembly that requests the assembly load is called Parent Assembly Hint.   You can see the parent assembly hint from fusion binding log:  === Pre-bind state information ===LOG: User = …LOG: DisplayName = System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089 (Fully-specified)LOG: Appbase = file:///d:/tools/LOG: Initial PrivatePath = NULLLOG: Dynamic Base =…


Assembly loading failure is expensive

Assembly loading failure is very expensive.   CLR will need to probe all the possible places before giving up. This is a lot of disk I/Os. If the application base is in UNC share or http, the performance will be much worse. If CLR can’t find anything by probing, CLR will ask Windows Installer to…


Publisher Policy — Highest version, which highest?

You can use publisher policy to redirect assembly version. When there are multiple publisher policy assemblies for the same assembly, the highest version of publisher policy assembly will be used. Turns out there is a bug in .Net framework v1.0/v1.1, that the alphabetic higest version, instead of the numeric highest version of publisher policy assembly…


ReflectionOnlyAssemblyResolve Event

For a discussion of ReflectionOnlyAssemblyResolve event, please visit my previous article “Reflection Only Assembly Loading“. ReflectionOnlyAssemblyResolve event is raised only for dependencies — Which means, it will *not* be raised for top level Assembly.ReflectionOnlyLoad(assemblyName).



Recently I have heard a great deal of confusion around DEVPATH. This blog tries to clarify a few things about DEVPATH.   What is DEVPATH? DEVPATH is documented in MSDN (How to: Locate Assemblies by Using DEVPATH). In a nutshell, DEVPATH is a mechanism to enable debugging of private copies of shared assemblies without affecting…


CLR is uninstalled. Now what?

We have an interesting discussion a little while ago in internal discussion. The scenario goes like this: 1. Install .Net framework 2.02. Install Product A(which uses CLR), which installs a bunch of assemblies to GAC.3. Install Application B (which uses CLR) that uses Product A’s assemblies in GAC. 4. Uninstall .Net framework. (Product A/Application B no…


Running MSIL applications as 32 bit in 64 bit OS

Managed applications compiled with compiler option /platform:anycpu (MSIL only applications) will be executed as 64 bit native processes. The decision is made by the OS. There isn’t anything you can do to override this (except by modifying the images using corflags ). In order to run those applications as 32 bit process, you have to…


Break when ntdll.dll is mapped

When you debug a Win32 application, by default the debugger will stop after ntdll finishes initializing the application. (Initialization includes not not limited to loading the static dependencies of the applications and running the DllMain of those dlls.) Usually this does not matter. But if you want to debug the process initialization, you will need something better. You…