ConcurrentHashSet icon indicating copy to clipboard operation
ConcurrentHashSet copied to clipboard

CS0436 \ConcurrentHashSet\src\ConcurrentHashSet\NullableAttributes.cs…

Open huster-songtao opened this issue 3 years ago • 1 comments

… 中的类型“MaybeNullWhenAttribute”与“System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中的导入类型“MaybeNullWhenAttribute”冲突。请使用 ConcurrentHashSet\src\ConcurrentHashSet\NullableAttributes.cs 中定义的类型。 ConcurrentHashSet (net6) D:\github\ConcurrentHashSet\src\ConcurrentHashSet\ConcurrentHashSet.cs

Microsoft.SourceLink.GitHub use 1.1.1 version.

Delete NullableAttributes.cs

Support netstandard2.1 and net6

use namespace System.Collections.Concurrent

huster-songtao avatar Mar 21 '22 11:03 huster-songtao

Hi, I'm not really sure what this PR is trying to achieve. It seems it contains many things combined together and I would prefer to deal with each in a separate PR/issue so we can discuss each change.

Also,

Delete NullableAttributes.cs

The MaybeNullWhenAttribute makes the nullability conditional on the return value. Which is better than using T?.

Support netstandard2.1 and net6

Why? there's no reason to target netstandard 2.1 as this isn't using any 2.1 features. And net46 is not recommended as a target.

use namespace System.Collections.Concurrent

This is .NET's namespace, which can't be used as this is an OSS library outside of .NET.

i3arnon avatar Mar 22 '22 11:03 i3arnon