Repository navigation
.NET: Prepare for .NET 11 TFM support - #10240
Roger Barreto (rogerbarreto) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The repository-wide upgrade remains RC-based, with final SDK, TestHost, and container updates plus Release packaging and integration validation still outstanding beyond the reported scoped Debug checks.
No open issues 🎉
What changed in this PR
Prepares Agent Framework’s .NET implementation for .NET 11 while retaining existing framework targets. The draft uses release-candidate tooling and documents the remaining transition to general availability.
Changes:
- Adds .NET 11 framework coverage and public API baselines.
- Updates SDK selection, CI matrices, sample build images, and local-package installation checks.
- Adjusts dependencies and tests for compatibility, including a temporary DevUI SDK workaround and thread-isolated diagnostic capture.
| File | Description |
|---|---|
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/WorkflowHostSmokeTests.cs |
Uses collection counts for nonempty checks. |
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/WorkflowExpressionEngineTests.cs |
Isolates trace capture to the evaluating thread. |
dotnet/tests/Microsoft.Agents.AI.Harness.UnitTests/HarnessAgentTests.cs |
Uses a direct nonempty assertion. |
dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/WebBrowsingToolTests.cs |
Enables tests on .NET 10 and later. |
dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/StatelessWebSearchChatClientTests.cs |
Enables tests on .NET 10 and later. |
dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests.csproj |
Extends the sample reference to compatible frameworks. |
dotnet/tests/Microsoft.Agents.AI.Declarative.UnitTests/Microsoft.Agents.AI.Declarative.UnitTests.csproj |
Adds an explicit configuration dependency. |
dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/Microsoft.Agents.AI.CosmosNoSql.UnitTests.csproj |
Adds the .NET 11 test target. |
dotnet/tests/Directory.Build.props |
Adds .NET 11 to shared test targets. |
dotnet/src/Microsoft.Agents.AI/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Records pending core APIs for .NET 11. |
dotnet/src/Microsoft.Agents.AI/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the core .NET 11 API baseline. |
dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/Magentic/ChatMessageExtensions.cs |
Uses a null-safe collection count pattern. |
dotnet/src/Microsoft.Agents.AI.Workflows/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Initializes .NET 11 pending API tracking. |
dotnet/src/Microsoft.Agents.AI.Workflows.Generators/Microsoft.Agents.AI.Workflows.Generators.csproj |
Explicitly limits generator targets to .NET Standard 2.0. |
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Records pending declarative workflow API changes. |
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the declarative workflow API baseline. |
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative.Mcp/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Records pending declarative MCP API changes. |
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative.Mcp/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the declarative MCP API baseline. |
dotnet/src/Microsoft.Agents.AI.OpenAI/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Initializes .NET 11 pending API tracking. |
dotnet/src/Microsoft.Agents.AI.OpenAI/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the OpenAI .NET 11 API baseline. |
dotnet/src/Microsoft.Agents.AI.Hyperlight/Microsoft.Agents.AI.Hyperlight.csproj |
Adopts shared framework targets, including .NET 11. |
dotnet/src/Microsoft.Agents.AI.Harness/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Initializes .NET 11 pending API tracking. |
dotnet/src/Microsoft.Agents.AI.Harness/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the Harness .NET 11 API baseline. |
dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Initializes .NET 11 pending API tracking. |
dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the GitHub Copilot .NET 11 API baseline. |
dotnet/src/Microsoft.Agents.AI.DevUI/Microsoft.Agents.AI.DevUI.csproj |
Adds the RC-specific browser-tools workaround. |
dotnet/src/Microsoft.Agents.AI.Declarative/Microsoft.Agents.AI.Declarative.csproj |
Conditions configuration and logging dependencies on framework. |
dotnet/src/Microsoft.Agents.AI.Anthropic/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Initializes .NET 11 pending API tracking. |
dotnet/src/Microsoft.Agents.AI.Anthropic/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the Anthropic .NET 11 API baseline. |
dotnet/src/Microsoft.Agents.AI.Abstractions/PublicAPI/net11.0/PublicAPI.Unshipped.txt |
Initializes .NET 11 pending API tracking. |
dotnet/src/Microsoft.Agents.AI.Abstractions/PublicAPI/net11.0/PublicAPI.Shipped.txt |
Adds the abstractions .NET 11 API baseline. |
dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Dockerfile |
Uses the .NET 11 RC build image. |
dotnet/samples/05-end-to-end/AspNetAgentAuthorization/RazorWebClient/Dockerfile |
Uses the .NET 11 RC build image. |
dotnet/samples/02-agents/AgentProviders/google-gemini/Agent_With_GoogleGemini/Agent_With_GoogleGemini.csproj |
Adopts shared framework targets, including .NET 11. |
dotnet/README.md |
Documents source prerequisites and GA transition steps. |
dotnet/global.json |
Selects the .NET 11 RC SDK. |
dotnet/Directory.Packages.props |
Adds the .NET 11 TestHost package version. |
dotnet/Directory.Build.props |
Adds .NET 11 to shared library targets. |
.github/workflows/dotnet-verify-samples.yml |
Retains .NET 10 tooling alongside the selected SDK. |
.github/workflows/dotnet-integration-tests.yml |
Adds .NET 11 and updates test-runner arguments. |
.github/workflows/dotnet-format.yml |
Selects the .NET 11 RC formatting image. |
.github/workflows/dotnet-build-and-test.yml |
Expands .NET 11 CI coverage and verifies locally built packages. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): eec8854eb37b
Model: gpt-5.6-sol
Overview
The PR adds .NET 11 targeting through the central framework lists, SDK pin, public API baselines, and CI matrices while retaining existing targets. Its strongest guardrails are cross-platform net11 builds, target-filtered unit and integration runs, per-framework TestHost selection, package-content checks, and installation tests against locally built packages. These controls and the narrowly scoped compatibility edits did not leave a verified Critical, High, or Medium defect.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Motivation & Context
Prepare Agent Framework for .NET 11 Standard Term Support while retaining the existing framework targets. This PR is intended to remain a draft until .NET 11 is generally available.
Description & Review Guide
net11.0to projects that support .NET 9, add public API baselines, select the .NET 11 RC SDK, and update build, test, packaging, and sample workflows.Local Debug validation covered the filtered .NET 11 unit suite (9,795 passed, 322 skipped), scoped package builds and installation on .NET 8 through .NET 11, and 34 in-memory integration tests on each of .NET 10 and .NET 11. After the final diagnostic test update, the following commands passed with 1,375 tests each:
dotnet test --project tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests.csproj -f net11.0 -c Debug --no-restore --ignore-exit-code 8: passed.dotnet test --project tests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests\Microsoft.Agents.AI.Workflows.Declarative.UnitTests.csproj -f net10.0 -c Debug --no-restore --ignore-exit-code 8: passed.The scoped formatting check passed in the CI SDK container with source control metadata queries disabled. The .NET 10 Windows unit run had one failure while deleting a directory junction during test cleanup. The same deletion failed under the standalone .NET 10 runtime. Live service integration tests were not run.
Related Issue
N/A. Maintainer-initiated work. No issue is linked.
AI Assistance
AI assistance details: AI assisted with implementation, tests, documentation, and this PR description. Author review and verification remain pending.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.