有没有办法找出谁在尝试在运行时加载给定的程序集?

时间:2020-06-25 06:00:30

标签: c# .net windows .net-assembly

在运行时,我得到:

ERR:程序集引用与程序集定义不匹配 找到。

我能够收集以下信息:

*** Assembly Binder Log Entry  (6/24/2020 @ 9:08:56 AM) ***

The operation failed.
Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Program Files (x86)\XXX\yyy.exe
--- A detailed error log follows. 

Pre-bind state information
LOG: DisplayName = System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/XXX/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = yyy.exe
Calling assembly : Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=pp2b13ffcd2eeef21.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\XXX\yyy.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Redirect found in application configuration file: 4.2.0.0 redirected to 4.2.0.1.
LOG: Post-policy reference: System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=pp2b13ffcd2eeef21
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/XXX/System.Threading.Tasks.Extensions.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files (x86)\XXX\System.Threading.Tasks.Extensions.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=pp2b13ffcd2eeef21
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
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.

*** Assembly Binder Log Entry  (6/24/2020 @ 9:08:56 AM) ***

The operation failed.
Bind result: hr = 0x80131040. No description available.

是否有办法找出哪个项目/程序集/依赖项(直到Program.cs的整个递归链)试图在应用程序加载时加载System.Threading.Tasks.Extensions?

0 个答案:

没有答案
相关问题