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=126.96.36.199, 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=188.8.131.52, 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.
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: 184.108.40.206 redirected to 220.127.116.11. LOG: Post-policy reference: NLog, Version=18.104.22.168, 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.
User contributions licensed under CC BY-SA 3.0