David-Desmaisons/ComposableAsync

Compatibility issues with .NET Core 3.0 IAsyncEnumerable

darkms opened this issue · 3 comments

Hi, I've tried using this lib (indirectly via https://github.com/David-Desmaisons/RateLimiter) in .NET Core 3.0 app recently, but as soon as I add the reference to ComposableAsync.Core NuGet package, the dotnet build breaks on IAsyncEnumerable code block with an error:
Error CS0656: Missing compiler required member 'System.IAsyncDisposable.DisposeAsync' (20, 3)

Can be reproed in .NET Core 3.0 apps by simply including the following code block to the app code:

		private static async IAsyncEnumerable<int> GetDataAsync()
		{
			for (var i = 0; i < 10; i++)
			{
				await Task.Delay(100);
				yield return i;
			}
		}

My best guess is that it's related to ComposableAsync.Core/Disposable/IAsyncDisposable.cs which seems to be declaring System.IAsyncDisposable and confuses Roslyn.

Thanks for reporing this. You are probably correct with your guest. I will need to install VS 2019 to udapte the dependency and make the project compatible with .Net Core 3.

Issue confirmed. Ran into this today.

I've got the same issue. See my issue and PR on RateLimiter - this is preventing the use of the library at the moment.