Microsoft.Bcl.AsyncInterfaces 9.0.4

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.Bcl.AsyncInterfaces --version 9.0.4
                    
NuGet\Install-Package Microsoft.Bcl.AsyncInterfaces -Version 9.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Bcl.AsyncInterfaces --version 9.0.4
                    
#r "nuget: Microsoft.Bcl.AsyncInterfaces, 9.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Microsoft.Bcl.AsyncInterfaces&version=9.0.4
                    
Install Microsoft.Bcl.AsyncInterfaces as a Cake Addin
#tool nuget:?package=Microsoft.Bcl.AsyncInterfaces&version=9.0.4
                    
Install Microsoft.Bcl.AsyncInterfaces as a Cake Tool

About

As of C# 8, the C# language has support for producing and consuming asynchronous iterators. The library types in support of those features are available in .NET Core 3.0 and newer as well as in .NET Standard 2.1. This library provides the necessary definitions of those types to support these language features on .NET Framework and on .NET Standard 2.0. This library is not necessary nor recommended when targeting versions of .NET that include the relevant support.

Key Features

  • Enables the use of C# async iterators on older .NET platforms

How to Use

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

internal static class Program
{
    private static async Task Main()
    {
        Console.WriteLine("Starting...");
        await foreach (var value in GetValuesAsync())
        {
            Console.WriteLine(value);
        }
        Console.WriteLine("Finished!");

        static async IAsyncEnumerable<int> GetValuesAsync()
        {
            for (int i = 0; i < 10; i++)
            {
                await Task.Delay(TimeSpan.FromSeconds(1));
                yield return i;
            }
        }
    }
}

Main Types

The main types provided by this library are:

  • IAsyncEnumerable<T>
  • IAsyncEnumerator<T>
  • IAsyncDisposable<T>

Additional Documentation

Feedback & Contributing

Microsoft.Bcl.AsyncInterfaces is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1.6K)

Showing the top 5 NuGet packages that depend on Microsoft.Bcl.AsyncInterfaces:

Package Downloads
Microsoft.Extensions.DependencyInjection.Abstractions

Abstractions for dependency injection. Commonly Used Types: Microsoft.Extensions.DependencyInjection.IServiceCollection

Microsoft.Extensions.DependencyInjection

Default implementation of dependency injection for Microsoft.Extensions.DependencyInjection.

Microsoft.Extensions.Logging

Logging infrastructure default implementation for Microsoft.Extensions.Logging.

System.Text.Json

Provides high-performance and low-allocating types that serialize objects to JavaScript Object Notation (JSON) text and deserialize JSON text to objects, with UTF-8 support built-in. Also provides types to read and write JSON text encoded as UTF-8, and to create an in-memory document object model (DOM), that is read-only, for random access of the JSON elements within a structured view of the data. The System.Text.Json library is built-in as part of the shared framework in .NET Runtime. The package can be installed when you need to use it in other target frameworks.

Microsoft.Extensions.Hosting.Abstractions

Hosting and startup abstractions for applications.

GitHub repositories (441)

Showing the top 20 popular GitHub repositories that depend on Microsoft.Bcl.AsyncInterfaces:

Repository Stars
microsoft/PowerToys
Windows system utilities to maximize productivity
PowerShell/PowerShell
PowerShell for every system!
AvaloniaUI/Avalonia
Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
DapperLib/Dapper
Dapper - a simple object mapper for .Net
peass-ng/PEASS-ng
PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
dotnet/runtime
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
App-vNext/Polly
Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
jbogard/MediatR
Simple, unambitious mediator implementation in .NET
chocolatey/choco
Chocolatey - the package manager for Windows
dotnet/machinelearning
ML.NET is an open source and cross-platform machine learning framework for .NET.
JeffreySu/WeiXinMPSDK
微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 8.0。已支持微信公众号、小程序、小游戏、微信支付、企业微信/企业号、开放平台、JSSDK、微信周边等全平台。 WeChat SDK for C#.
StockSharp/StockSharp
Algorithmic trading and quantitative trading open source platform to develop trading robots (stock markets, forex, crypto, bitcoins, and options).
MassTransit/MassTransit
Distributed Application Framework for .NET
dotnet/reactive
The Reactive Extensions for .NET
microsoft/FASTER
Fast persistent recoverable log and key-value store + cache, in C# and C++.
MessagePack-CSharp/MessagePack-CSharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Version Downloads Last updated
10.0.0-preview.3.25171.5 889 4/10/2025
10.0.0-preview.2.25163.2 18,501 3/18/2025
10.0.0-preview.1.25080.5 12,950 2/25/2025
9.0.4 70,213 4/8/2025
9.0.3 926,161 3/11/2025
9.0.2 1,789,710 2/11/2025
9.0.1 2,335,741 1/14/2025
9.0.0 6,238,063 11/12/2024
9.0.0-rc.2.24473.5 106,946 10/8/2024
9.0.0-rc.1.24431.7 63,775 9/10/2024
9.0.0-preview.7.24405.7 75,506 8/13/2024
9.0.0-preview.6.24327.7 51,005 7/9/2024
9.0.0-preview.5.24306.7 48,394 6/11/2024
9.0.0-preview.4.24266.19 46,850 5/21/2024
9.0.0-preview.3.24172.9 53,562 4/11/2024
9.0.0-preview.2.24128.5 48,370 3/12/2024
9.0.0-preview.1.24080.9 64,318 2/13/2024
8.0.0 93,933,782 11/14/2023
8.0.0-rc.2.23479.6 81,839 10/10/2023
8.0.0-rc.1.23419.4 107,001 9/12/2023
8.0.0-preview.7.23375.6 46,902 8/8/2023
8.0.0-preview.6.23329.7 43,814 7/11/2023
8.0.0-preview.5.23280.8 71,879 6/13/2023
8.0.0-preview.4.23259.5 151,110 5/16/2023
8.0.0-preview.3.23174.8 74,742 4/11/2023
8.0.0-preview.2.23128.3 338,609 3/14/2023
8.0.0-preview.1.23110.8 29,750 2/21/2023
7.0.0 117,821,105 11/7/2022
7.0.0-rc.2.22472.3 49,177 10/11/2022
7.0.0-rc.1.22426.10 46,336 9/14/2022
7.0.0-preview.7.22375.6 38,337 8/9/2022
7.0.0-preview.6.22324.4 24,804 7/12/2022
7.0.0-preview.5.22301.12 25,164 6/14/2022
7.0.0-preview.4.22229.4 41,691 5/10/2022
7.0.0-preview.3.22175.4 29,287 4/13/2022
7.0.0-preview.2.22152.2 24,958 3/14/2022
7.0.0-preview.1.22076.8 26,116 2/17/2022
6.0.0 408,382,178 11/8/2021
6.0.0-rc.2.21480.5 79,762 10/12/2021
6.0.0-rc.1.21451.13 76,541 9/14/2021
6.0.0-preview.7.21377.19 42,726 8/10/2021
6.0.0-preview.6.21352.12 29,718 7/14/2021
6.0.0-preview.5.21301.5 66,453 6/15/2021
6.0.0-preview.4.21253.7 38,686 5/24/2021
6.0.0-preview.3.21201.4 71,840 4/8/2021
6.0.0-preview.2.21154.6 84,443 3/11/2021
6.0.0-preview.1.21102.12 86,167 2/12/2021
5.0.0 308,852,117 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.5 99,848 10/13/2020
5.0.0-rc.1.20451.14 201,756 9/14/2020
1.1.1 670,362,427 5/12/2020
1.1.0 359,435,312 12/3/2019
1.1.0-preview3.19551.4 447,452 11/13/2019
1.1.0-preview2.19523.17 73,889 11/1/2019
1.1.0-preview1.19504.10 81,226 10/15/2019
1.0.0 503,022,013 9/23/2019
1.0.0-rc1.19456.4 94,788 9/16/2019
1.0.0-preview9.19421.4 148,237 9/4/2019
1.0.0-preview9.19416.11 978 9/4/2019
1.0.0-preview8.19405.3 101,889 8/13/2019
1.0.0-preview7.19362.9 144,170 7/23/2019
1.0.0-preview6.19303.8 37,751 6/12/2019
1.0.0-preview6.19264.9 1,201 9/4/2019
1.0.0-preview6.19259.10 25,183 5/10/2019