拥有两个不同的依赖程序集但具有相同的公钥令牌是否正常?

ran*_*cia 5 c# asp.net model-view-controller strongname .net-assembly

System.IO.FileSystem.Primitives -> b03f5f7f11d50a3a

System.Runtime.CompilerServices.Unsafe -> b03f5f7f11d50a3a

<dependentAssembly>
            <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
Run Code Online (Sandbox Code Playgroud)

我有这个错误:

具有相同标识“ System.IO.FileSystem.Primitives , Version=4.0.2.0, Culture=neutral, PublicKeyToken= b03f5f7f11d50a3a ”的程序集已导入。尝试删除重复的引用之一。

Mar*_*ell 4

是的,这是正常现象;这里的密钥令牌是用于对程序集进行强命名的密钥的指纹 - 它对于程序集本身来说并不是唯一的(除非库作者创建了一个密钥并且仅使用它来签署一个程序集)。对于系统程序集,它们通常都由相同的密钥(或一小组密钥)签名。b03f5f7f11d50a3a是一个非常知名的密钥令牌 - 它甚至在 ECMA-335 规范中被提及。