admin管理员组文章数量:1122832
I have been upgrading all our projects to target .NET framework 4.6.2 and I'm running into a maddening problem. When I run the application it runs fine. However, when I run the unit tests I get an assembly load failure:
=== Pre-bind state information ===
LOG: DisplayName = System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Source/FeatureBranch/Kernel/CDSCore.Tests/bin/Debug
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Source\FeatureBranch\Kernel\CDSCore.Tests\bin\Debug\CDSCore.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Source/FeatureBranch/Kernel/CDSCore.Tests/bin/Debug/System.Runtime.CompilerServices.Unsafe.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Source\FeatureBranch\Kernel\CDSCore.Tests\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
WRN: Comparing the assembly name resulted in the mismatch: Build 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.
So if I compare the two dlls (One in the CDSCore.Tests folder and another in a system dll dir CDSCore) See this:
They are the exact same file. However, if I open them in ildasm you see this which shows different assembly versions. How on earth is this the case?
本文标签: cSystemRuntimeCompilerServicesUnsafedll 61 has two different assembly versionsStack Overflow
版权声明:本文标题:c# - System.Runtime.CompilerServices.Unsafe.dll 6.1 has two different assembly versions - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736310145a1934272.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论