Skip to content

.NET: Prepare for .NET 11 TFM support - #10240

Draft
Roger Barreto (rogerbarreto) wants to merge 1 commit into
microsoft:mainfrom
rogerbarreto:dotnet-11-support
Draft

Roger Barreto (rogerbarreto) wants to merge 1 commit into
microsoft:mainfrom
rogerbarreto:dotnet-11-support

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

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

  • What are the major changes? Add net11.0 to projects that support .NET 9, add public API baselines, select the .NET 11 RC SDK, and update build, test, packaging, and sample workflows.
  • What is the impact of these changes? Existing framework targets remain available. Building from source requires the .NET 11 RC SDK. An SDK workaround temporarily omits the DevUI project's generated browser tools assets in Debug builds under the RC SDK.
  • What do you want reviewers to focus on? Framework coverage, the package installation checks, the SDK workaround, and the changes needed when .NET 11 reaches general availability. Before bringing this draft forward, update the SDK, TestHost package, and SDK images to GA versions, revisit the workaround for dotnet/sdk#56656, and rerun the affected checks.

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

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: AI assisted with implementation, tests, documentation, and this PR description. Author review and verification remain pending.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 17:26
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Nov 10, 2026
@rogerbarreto Roger Barreto (rogerbarreto) changed the title .NET: Prepare .NET 11 support for GA .NET: Prepare for .NET 11 TFM support Nov 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch was successfully deployed

1 active deployment
github-app-auth — eec8854e Deployed Nov 10, 2026 by rogerbarreto via add_label #27519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants