dotnet / dotnet/reactive

AsyncEnumerable.Empty not accessible with the 7.* preview nugets

Open
#2,259 3 comments 0 reactions 0 assignees View on GitHub
[area] Ix
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

> Which library version?

7.0.0-preview.1.g24680b5469

> What are the platform(s), environment(s) and related component version(s)?

.NET 10, but lower versions with the System.Linq.AsyncEnumerable compat nuget as well.

> What is the use case or problem?

While there are mostly extension methods in the `System.Linq.AsyncEnumerable` type, the static [`Empty()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.empty?view=net-10.0) method is meant to be called via the static class name directly.
This currently results in an ambiguous type error:

> Do you have a code snippet or project that reproduces the problem?

```
public class C {
public IAsyncEnumerable M() => AsyncEnumerable.Empty();
}
```

> What is the expected outcome?

The code should compile without errors

> What is the actual outcome?

```
The type 'AsyncEnumerable' exists in both 'System.Linq.Async, Version=7.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263' and 'System.Linq.AsyncEnumerable, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.