-
Notifications
You must be signed in to change notification settings - Fork 4.2k
.Net: Prepare code for A2A SDK and AsyncEnumerable NuGet update #12842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
SergeyMenshykh
merged 9 commits into
microsoft:main
from
SergeyMenshykh:prep-for-a2a-sdk-and-asyncenumerable-nuget
Aug 6, 2025
Merged
.Net: Prepare code for A2A SDK and AsyncEnumerable NuGet update #12842
SergeyMenshykh
merged 9 commits into
microsoft:main
from
SergeyMenshykh:prep-for-a2a-sdk-and-asyncenumerable-nuget
Aug 6, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
westey-m
reviewed
Aug 1, 2025
dotnet/samples/Demos/ModelContextProtocolClientServer/MCPClient/MCPClient.csproj
Outdated
Show resolved
Hide resolved
westey-m
reviewed
Aug 1, 2025
dotnet/samples/GettingStartedWithProcesses/GettingStartedWithProcesses.csproj
Outdated
Show resolved
Hide resolved
westey-m
reviewed
Aug 1, 2025
westey-m
reviewed
Aug 1, 2025
westey-m
approved these changes
Aug 1, 2025
markwallace-microsoft
approved these changes
Aug 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation, Context and Description
This PR prepares the SK codebase for a future update of the A2A agent to the new A2A .NET SDK and establishes the foundation for easy adoption of the System.Linq.AsyncEnumerable package when it released. This will completely eliminate the need for the AsyncEnumerable polyfills that SK currently uses.
As part of this preparation, this PR stops using of the System.Linq.Async package and replaces all SK calls to its APIs with either equivalent calls to the AsyncEnumerable polyfills or in-place implementations. This prevents "The call is ambiguous between..." name conflicts that would occur when the AsyncEnumerable APIs from the A2A .NET SDK's transitive dependency (System.Linq.AsyncEnumerable) become available to the Agents.UnitTests project, which already contains equivalent APIs from either AsyncEnumerable polyfills and/or the System.Linq.Async package brought in from other projects that have the Agents.UnitTests project specified as "InternalVisibleTo".
As a result, almost all non-production code (tests and samples) uses AsyncEnumerable APIs from the preview version of the System.Linq.AsyncEnumerable package, while production code uses either AsyncEnumerable APIs from polyfills or uses in-place implementations.