ZString icon indicating copy to clipboard operation
ZString copied to clipboard

v2.5.1 compile error: BitOperations duplicate in System.Runtime

Open XuToWei opened this issue 2 years ago • 11 comments

Error CS0433 : 类型“BitOperations”同时存在于“ZString, Version=2.5.1.0, Culture=neutral, PublicKeyToken=df4c250b14d82627”和“System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中

XuToWei avatar Oct 13 '23 08:10 XuToWei

Which platform?

BoysheO avatar Oct 22 '23 12:10 BoysheO

Which platform?

windows下,我有的库引入了BitOperations的官方库(System.Numerics),ZString里自己Copy了一份进来,就会报重复

https://learn.microsoft.com/zh-cn/dotnet/api/system.numerics.bitoperations?view=net-7.0&source=recommendations

XuToWei avatar Oct 26 '23 08:10 XuToWei

那不好解决吗?自己删掉重复的代码就好了。为什么提issue……

BoysheO avatar Oct 26 '23 11:10 BoysheO

这种三方库,一般都是NuGet安装的

XuToWei avatar Oct 26 '23 11:10 XuToWei

明白了,确实需要官方修改

BoysheO avatar Oct 26 '23 13:10 BoysheO

@neuecc The BitOperations class conflict with https://learn.microsoft.com/zh-cn/dotnet/api/system.numerics.bitoperations?view=net-7.0&source=recommendations. Could you please fix it.

ryancheung avatar Mar 22 '24 03:03 ryancheung

BitOperations shims is only exists in Unity version. I have no idea what the problem is.

neuecc avatar Mar 25 '24 08:03 neuecc

But, it's in the Nuget package at the moment.

ryancheung avatar Mar 25 '24 08:03 ryancheung

oh, sorry. I checked, and there seems to be an unintended issue with the compile include. I will fix it.

neuecc avatar Mar 25 '24 09:03 neuecc

I've released v2.6.0, may solves it.

neuecc avatar Mar 25 '24 09:03 neuecc

Thanks!

ryancheung avatar Mar 25 '24 09:03 ryancheung