Skip to content

BUG: The type 'MemoryExtensions' exists in both assemblies in version 1.5 #25

@laicasaane

Description

@laicasaane

Describe the bug
When I upgrade this library to v1.5 in a Unity project which uses .NET Standard 2.1, the compiler throws errors like this:

Error CS0433: The type 'MemoryExtensions' exists in both 'SpanExtensions.Net.Unity, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

To Reproduce
I don't suppose you're using Unity so I will omit this part because this ultimately doesn't relate to Unity.

Expected behavior
No compilation error.

Version
v1.5

Additional context
The type 'MemoryExtensions' already exists since .NET Standard 2.1, this define

#if !NET9_0_OR_GREATER

is not a good one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions