gpt4 book ai didi

.net - 程序集绑定(bind)日志中的 Post-Policy 引用是什么?

转载 作者:行者123 更新时间:2023-12-04 04:25:04 24 4
gpt4 key购买 nike

试图理解这个程序集绑定(bind)失败 - 下面日志中的“后策略引用”是什么意思?

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=2.6.0.0, 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=2.4.0.0, 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.

我在我的代码引用中看不到 DLL,所以我试图弄清楚发生了什么。

最佳答案

我的理解是,“后策略引用”是发布者策略之后的程序集引用,并且在一般程序集重定向发生后。例如见 https://indexoutofrange.com/Could_not_load_file_or_assembly_or_one_of_its_dependencies/举一些例子。

如果指定了重定向,则融合日志将如下所示:

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

关于为什么加载此 dll,那么您从日志中提取的片段缺少相关行。在上面的线上
LOG: This bind starts in default load context.

应该有类似的东西
Calling assembly : XYZ.

引用引用了 Microsoft.WindowsAzure.Diagnostics 的程序集.再次查看前面的链接以获取示例。

关于.net - 程序集绑定(bind)日志中的 Post-Policy 引用是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33091654/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com