1

When attempting to use IAsyncEnumerable, I get this error:

The type or namespace name IAsyncEnumerable<> could not be found (are you missing a using directive or assembly reference?)

How do I make this compatible with c# 8?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
cubesnyc
  • 1,385
  • 2
  • 15
  • 32

1 Answers1

6

Some C# 8 and .NET Framework combination are not (and may not ever) be officially supported by Microsoft. It's dying a slow, painful death.

As of today IAsyncEnumerable<T> is only officially available for the following frameworks

  • .NET Core 3.0
  • .NET Platform Extensions 3.0
  • .NET Standard 2.1

However, check out the following post, you might be able to mash it in

Does C# 8 support the .NET Framework?

halfer
  • 19,824
  • 17
  • 99
  • 186
TheGeneral
  • 79,002
  • 9
  • 103
  • 141