为什么这个程序集绑定成功了?

时间:2011-12-07 08:50:27

标签: .net .net-assembly

通常关于装配绑定的问题与缺少的装配有关。这次我想知道为什么绑定有效:它正在寻找ServiceStack.Common, Version=1.0.4356.8984,但它已加载1.0.4356.6807

为什么吗

  • 非签名程序集是否仅匹配mayor.minor版本号?
  • 是否始终忽略构建版本(第四个数字)。

由于版本号不正确,但VisualStudio没有检测到此文件,但.NET运行时加载了它,这让我感到困惑。

备注:此日志来自fuslogvw,我已将一些长/私有路径更改为“...”。

*** Assembly Binder Log Entry  (7/12/2011 @ 10:11:13 πμ) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:  C:\Windows...64\v4.0.30319\clr.dll
Running under executable  C:\.....CLR4.MSIL.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = MYDOMAIN\me
LOG: DisplayName = ServiceStack.Common, 
     Version=1.0.4356.8984, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///.../bin/Debug
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = C:\...\AppData\Local\Temp\wn3bbgg5.px5
LOG: AppName = MyApp.Tests.Unit
Calling assembly : ServiceStack, 
     Version=3.0.9.8993, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: 
     D:\....Tests.Unit.dll.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from 
     C:\...64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL 
     file:///.../bin/Debug/ServiceStack.Common.DLL.
LOG: Assembly download was successful. Attempting setup of file: 
     D:\...\bin\Debug\ServiceStack.Common.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: ServiceStack.Common, 
     Version=1.0.4356.6807, Culture=neutral, PublicKeyToken=null
LOG: Binding succeeds. Returns assembly from    
     C:\...\6868981a_1db4cc01\ServiceStack.Common.dll.
LOG: Assembly is loaded in default load context.

0 个答案:

没有答案