Skip to content

[Bug]: .NET 10 - conflict with System.Linq.Async #3202

@UncleDave

Description

@UncleDave

Check The Docs

  • I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • I verified the issue was caused by Discord.Net.

Check your intents

  • I double checked that I have the required intents.

Description

.NET 10 adds LINQ support for IAsyncEnumerable<T> which was previously covered by the community package System.Linq.Async. Microsoft's recommendation is to drop System.Linq.Async and use the new extensions when consumed by a .NET 10+ project.

As described on Microsoft's "Breaking Change" page consumers of Discord.Net can work around this for now by adding the following to the csproj that depends on Discord.Net:

<PackageReference Include="System.Linq.Async" Version="6.0.1">
  <ExcludeAssets>compile</ExcludeAssets>
</PackageReference>

This allows Discord.Net to continue to use System.Linq.Async, while resolving any ambigious method invocations in the consumer app's code.

Version

3.18.0

Working Version

No response

Logs

Build time error.

Sample

No response

Packages

N/A

Environment

.NET 10 SDK

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions