错误 CS0433:ThreadLocal<T> 类型同时存在于 NSubstitute 和 mscorlib 中
error CS0433: The type ThreadLocal<T> exists in both NSubstitute and mscorlib
我从 Unity 2019.2.21 升级到 2019.4.5。
现在我收到这个错误:
Library/PackageCache/com.unity.scriptablebuildpipeline@1.7.3/
Editor/Utilities/BuildLog.cs(51,9): error CS0433: The type
'ThreadLocal<T>' exists in both 'NSubstitute, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=92dd2e9066daa5ca' and 'mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
这很奇怪,因为在 Unity 2019.2.21 中一切正常。
This question 看起来很相似,但无法帮助我。
有什么想法吗?
我按照 中所述将我的 NSubstitute.dll
升级到版本 2.0.3,这解决了问题。
显然旧版本的 NSubstitute 自己定义了 ThreadLocal
,这导致了我的问题(感谢 David Tchepak!)。
我从 Unity 2019.2.21 升级到 2019.4.5。
现在我收到这个错误:
Library/PackageCache/com.unity.scriptablebuildpipeline@1.7.3/
Editor/Utilities/BuildLog.cs(51,9): error CS0433: The type
'ThreadLocal<T>' exists in both 'NSubstitute, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=92dd2e9066daa5ca' and 'mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
这很奇怪,因为在 Unity 2019.2.21 中一切正常。
This question 看起来很相似,但无法帮助我。
有什么想法吗?
我按照 NSubstitute.dll
升级到版本 2.0.3,这解决了问题。
显然旧版本的 NSubstitute 自己定义了 ThreadLocal
,这导致了我的问题(感谢 David Tchepak!)。