ComposableAsync icon indicating copy to clipboard operation
ComposableAsync copied to clipboard

Compatibility issues with .NET Core 3.0 IAsyncEnumerable

Open darkms opened this issue 6 years ago • 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.

darkms avatar Nov 19 '19 08:11 darkms

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.

David-Desmaisons avatar Nov 23 '19 16:11 David-Desmaisons

Issue confirmed. Ran into this today.

jvanegmond avatar Nov 24 '19 16:11 jvanegmond

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

Nihlus avatar Jul 29 '20 11:07 Nihlus