What is Post-Policy reference in assembly binding log?


Trying to understand this assembly binding failure - What is the meaning of "Post-policy reference" in the log below?

LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\approot\WorkerRole.dll.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from D:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.WindowsAzure.Diagnostics, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///E:/approot/Microsoft.WindowsAzure.Diagnostics.DLL.
LOG: Assembly download was successful. Attempting setup of file: E:\approot\Microsoft.WindowsAzure.Diagnostics.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Microsoft.WindowsAzure.Diagnostics, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Run-from-source setup phase failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Nothing I can see in my code references that DLL so trying to figure out what is going on.

asked on Stack Overflow Oct 12, 2015 by noctonura

1 Answer


My understanding is that "Post-policy reference" is the assembly reference after publisher policies, and in general assembly redirections, have occured. See for instance https://indexoutofrange.com/Could_not_load_file_or_assembly_or_one_of_its_dependencies/ for some examples.

If a redirect was specified, the fusion log will look like this:

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Redirect found in application configuration file: redirected to
LOG: Post-policy reference: NLog, Version=, Culture=neutral, PublicKeyToken=5120e14c03d0593c

With respect to why this dll is loaded then you snippet from the log is missing the relevant line. On the line just above

LOG: This bind starts in default load context.

there should be something like

Calling assembly : XYZ.

referencing the assembly that has a reference to Microsoft.WindowsAzure.Diagnostics. Again see the previous link for examples.

answered on Stack Overflow Feb 28, 2017 by Mikkelbu • edited Apr 29, 2020 by riQQ

User contributions licensed under CC BY-SA 3.0