Skip to content

.NET: Add SDK 11 TFM Support - #10386

Open
Roger Barreto (rogerbarreto) wants to merge 5 commits into
mainfrom
feature/dotnet-11-support
Open

Roger Barreto (rogerbarreto) wants to merge 5 commits into
mainfrom
feature/dotnet-11-support

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

Motivation & Context

Add TFM Support for SDK 11.

* feat(dotnet): add .NET 11 RC support

* build(dotnet): use .NET 11 GA and simplify CI

Retain existing workflow behavior where .NET 11 does not require changes.

Separate Foundry test request identities so concurrent hosts cannot
delete one another's temporary response files.

* fix(ci): use the configured .NET test runner

Run integration tests from the directory containing global.json.
Use the configured runner's filter and reporting options instead of
the older VSTest runner, which fails with the .NET 11 SDK.

* ci: test net11.0 instead of net10.0 in single test lanes

Follow the .NET 10 upgrade pattern: newest target runs unit, integration and coverage; net10.0 stays in the build matrix.

* test: drop unrelated x-agent-user-id header change

* test(dotnet): include .NET 11 test targets

* test(dotnet): centralize test framework targets

* fix(dotnet): sync net11 MCP handler API baseline

Main changed the DefaultMcpToolHandler constructor in #10192. Mirror the updated net10.0 baseline for net11.0.

@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 (3 commit(s)): bbfa7e63d64f, b1b4e101be90, eee9d31c8b03
Model: gpt-5.6-sol

Overview

The PR adds .NET 11 as the leading production TFM, moves modern test execution to net11, updates the MEAI dependency family, and preserves net10/net9/net8 and net472 coverage where intended. Its strongest guardrails are the multi-TFM package-consumer build, net11 unit and integration execution, TFM-specific package versions, source-generator targeting, and new public API baselines. No Critical, High, or Medium defect remained after reconciling the proposed standalone-sample dependency concern against the pre-change graph and a clean isolated build of the post-change project.

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.

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.

🟡 Changes recommended

The integration workflow runs hosted-agent tests without required image configuration, causing fixture initialization failures, while net11-only targeting removes runnable test coverage for the net8/net9 fallback.

2 open issues
What changed in this PR

Adds .NET 11 support to Agent Framework’s .NET build, packaging, and test infrastructure while retaining existing library targets.

Changes:

  • Updates the SDK, shared target frameworks, dependencies, and .NET 11 public API baselines.
  • Moves modern test targets and hosted integration containers to .NET 11, with related test and build adjustments.
  • Updates CI workflows, sample build images, and contributor commands.
File Description
dotnet/​tests/​Microsoft.Agents.AI.Workflows.Generators.UnitTests/​Microsoft.Agents.AI.Workflows.Generators.UnitTests.csproj Uses the shared modern test target.
dotnet/​tests/​Microsoft.Agents.AI.Workflows.Declarative.UnitTests/​UpdateBaseline.ps1 Reads generated baselines from .NET 11 output.
dotnet/​tests/​Microsoft.Agents.AI.Valkey.UnitTests/​Microsoft.Agents.AI.Valkey.UnitTests.csproj Uses the shared modern test target.
dotnet/​tests/​Microsoft.Agents.AI.Tools.Shell.UnitTests/​Microsoft.Agents.AI.Tools.Shell.UnitTests.csproj Retargets shell unit tests.
dotnet/​tests/​Microsoft.Agents.AI.Tools.Shell.IntegrationTests/​Microsoft.Agents.AI.Tools.Shell.IntegrationTests.csproj Retargets shell integration tests.
dotnet/​tests/​Microsoft.Agents.AI.Mcp.UnitTests/​Microsoft.Agents.AI.Mcp.UnitTests.csproj Retargets tests and removes a logging reference.
dotnet/​tests/​Microsoft.Agents.AI.LocalCodeAct.UnitTests/​Microsoft.Agents.AI.LocalCodeAct.UnitTests.csproj Uses the shared modern test target.
dotnet/​tests/​Microsoft.Agents.AI.Hyperlight.UnitTests/​Microsoft.Agents.AI.Hyperlight.UnitTests.csproj Retargets Hyperlight unit tests.
dotnet/​tests/​Microsoft.Agents.AI.Hyperlight.IntegrationTests/​Microsoft.Agents.AI.Hyperlight.IntegrationTests.csproj Retargets Hyperlight integration tests.
dotnet/​tests/​Microsoft.Agents.AI.Hosting.UnitTests/​Microsoft.Agents.AI.Hosting.UnitTests.csproj Retargets hosting unit tests.
dotnet/​tests/​Microsoft.Agents.AI.Hosting.OpenAI.UnitTests/​Microsoft.Agents.AI.Hosting.OpenAI.UnitTests.csproj Retargets OpenAI hosting unit tests.
dotnet/​tests/​Microsoft.Agents.AI.Hosting.OpenAI.IntegrationTests/​Microsoft.Agents.AI.Hosting.OpenAI.IntegrationTests.csproj Retargets OpenAI hosting integration tests.
dotnet/​tests/​Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests/​Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.csproj Retargets AG-UI hosting unit tests.
dotnet/​tests/​Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/​Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests.csproj Retargets AG-UI hosting integration tests.
dotnet/​tests/​Microsoft.Agents.AI.Hosting.A2A.UnitTests/​Microsoft.Agents.AI.Hosting.A2A.UnitTests.csproj Retargets A2A hosting unit tests.
dotnet/​tests/​Microsoft.Agents.AI.GitHub.Copilot.UnitTests/​Microsoft.Agents.AI.GitHub.Copilot.UnitTests.csproj Retargets GitHub Copilot unit tests.
dotnet/​tests/​Microsoft.Agents.AI.GitHub.Copilot.IntegrationTests/​Microsoft.Agents.AI.GitHub.Copilot.IntegrationTests.csproj Retargets GitHub Copilot integration tests.
dotnet/​tests/​Microsoft.Agents.AI.Foundry.UnitTests/​FoundryAIToolTests.cs Adds final-image streaming regression coverage.
dotnet/​tests/​Microsoft.Agents.AI.Foundry.Hosting.UnitTests/​WebBrowsingToolTests.cs Includes browsing tests on .NET 10 and later.
dotnet/​tests/​Microsoft.Agents.AI.Foundry.Hosting.UnitTests/​StatelessWebSearchChatClientTests.cs Includes web-search tests on .NET 10 and later.
dotnet/​tests/​Microsoft.Agents.AI.Foundry.Hosting.UnitTests/​Microsoft.Agents.AI.Foundry.Hosting.UnitTests.csproj Retargets tests and broadens sample-reference compatibility.
dotnet/​tests/​Microsoft.Agents.AI.FeatureRegistry.UnitTests/​Microsoft.Agents.AI.FeatureRegistry.UnitTests.csproj Uses the shared modern test target.
dotnet/​tests/​Microsoft.Agents.AI.DevUI.UnitTests/​Microsoft.Agents.AI.DevUI.UnitTests.csproj Retargets DevUI unit tests.
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 Retargets tests and removes two package references.
dotnet/​tests/​Microsoft.Agents.AI.AgentHooks.UnitTests/​Microsoft.Agents.AI.AgentHooks.UnitTests.csproj Uses the shared modern test target.
dotnet/​tests/​Microsoft.Agents.AI.A2A.UnitTests/​Microsoft.Agents.AI.A2A.UnitTests.csproj Retargets A2A unit tests.
dotnet/​tests/​Foundry.Hosting.IntegrationTests/​scripts/​it-build-image.ps1 Publishes .NET 11 and checks matching prebuilt outputs.
dotnet/​tests/​Foundry.Hosting.IntegrationTests/​Foundry.Hosting.IntegrationTests.csproj Uses the shared modern integration-test target.
dotnet/​tests/​Foundry.Hosting.IntegrationTests.TestContainer/​Foundry.Hosting.IntegrationTests.TestContainer.csproj Aligns the container application with the test target.
dotnet/​tests/​Foundry.Hosting.IntegrationTests.TestContainer/​Dockerfile Uses the .NET 11 ASP.NET runtime image.
dotnet/​tests/​Directory.Build.props Centralizes modern tests on .NET 11.
dotnet/​tests/​Aspire.Hosting.AgentFramework.DevUI.UnitTests/​Aspire.Hosting.AgentFramework.DevUI.UnitTests.csproj Retargets Aspire DevUI unit tests.
dotnet/​src/​Microsoft.Agents.AI/​PublicAPI/​net11.0/​PublicAPI.Unshipped.txt Adds pending core API entries 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/​PublicAPI/​net11.0/​PublicAPI.Unshipped.txt Adds an empty .NET 11 unshipped baseline.
dotnet/​src/​Microsoft.Agents.AI.Workflows.Generators/​Microsoft.Agents.AI.Workflows.Generators.csproj Explicitly sets the generator framework list to netstandard2.0.
dotnet/​src/​Microsoft.Agents.AI.Workflows.Declarative/​PublicAPI/​net11.0/​PublicAPI.Unshipped.txt Mirrors pending HTTP-handler API changes for .NET 11.
dotnet/​src/​Microsoft.Agents.AI.Workflows.Declarative/​PublicAPI/​net11.0/​PublicAPI.Shipped.txt Adds the declarative workflows .NET 11 API baseline.
dotnet/​src/​Microsoft.Agents.AI.Workflows.Declarative.Mcp/​PublicAPI/​net11.0/​PublicAPI.Unshipped.txt Mirrors pending MCP-handler API changes for .NET 11.
dotnet/​src/​Microsoft.Agents.AI.Workflows.Declarative.Mcp/​PublicAPI/​net11.0/​PublicAPI.Shipped.txt Adds the declarative MCP .NET 11 API baseline.
dotnet/​src/​Microsoft.Agents.AI.OpenAI/​PublicAPI/​net11.0/​PublicAPI.Unshipped.txt Adds an empty .NET 11 unshipped baseline.
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 Uses shared library targets, including .NET 11.
dotnet/​src/​Microsoft.Agents.AI.Harness/​PublicAPI/​net11.0/​PublicAPI.Unshipped.txt Adds an empty .NET 11 unshipped baseline.
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 Adds an empty .NET 11 unshipped baseline.
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 a workaround scoped to SDK 11.0.100.
dotnet/​src/​Microsoft.Agents.AI.Declarative/​Microsoft.Agents.AI.Declarative.csproj Conditions configuration and logging references by target.
dotnet/​src/​Microsoft.Agents.AI.Anthropic/​PublicAPI/​net11.0/​PublicAPI.Unshipped.txt Adds an empty .NET 11 unshipped baseline.
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 Adds an empty .NET 11 unshipped baseline.
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 SDK 11 for the service build stage.
dotnet/​samples/​05-end-to-end/​AspNetAgentAuthorization/​RazorWebClient/​Dockerfile Uses SDK 11 for the client build stage.
dotnet/​samples/​04-hosting/​FoundryHostedAgents/​responses/​Hosted-Workflow-Handoff/​HostedWorkflowHandoff.csproj Updates the OpenAI adapter dependency.
dotnet/​samples/​02-agents/​AgentWithMemory/​AgentWithMemory_Step06_MemoryUsingAgentMemory/​AgentWithMemory_Step06_MemoryUsingAgentMemory.csproj Updates the memory sample’s OpenAI adapter dependency.
dotnet/​samples/​02-agents/​AgentProviders/​google-gemini/​Agent_With_GoogleGemini/​Agent_With_GoogleGemini.csproj Uses shared targets, including .NET 11.
dotnet/​global.json Selects SDK 11.0.100.
dotnet/​Directory.Packages.props Updates dependencies and adds target-specific versions.
dotnet/​Directory.Build.props Adds net11.0 to shared library targets.
dotnet/​.github/​skills/​build-and-test/​SKILL.md Updates contributor command examples to .NET 11.
.github/​workflows/​dotnet-verify-samples.yml Installs .NET 10 alongside the selected SDK.
.github/​workflows/​dotnet-integration-tests.yml Moves modern integration runs to .NET 11 and MTP syntax.
.github/​workflows/​dotnet-format.yml Updates the formatting matrix to .NET 11.
.github/​workflows/​dotnet-build-and-test.yml Updates build, test, coverage, and package-check configuration.

Review effort: Balanced

@github-code-quality

github-code-quality Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

main cf5ea19 feature/dotnet-11-su... 369acbe +/-
86% 86% 0%
View coverage of the 10 most impacted files.
File main cf5ea19 feature/dotnet-11-su... 369acbe +/-
/home/runner/wo...agnosticInfo.cs 71% 65% -6%
/home/runner/wo...uatableArray.cs 71% 67% -4%
/home/runner/wo...nticAnalyzer.cs 94% 91% -3%
/home/runner/wo...LocationInfo.cs 86% 85% -1%
/home/runner/wo...textProvider.cs 100% 100% 0%
/home/runner/wo...gerMessage.g.cs 0% 0% 0%
/home/runner/wo...gerMessage.g.cs 0% 75% +75%
/home/runner/wo...gerMessage.g.cs 0% 92% +92%
/home/runner/wo...gerMessage.g.cs 0% 100% +100%
/home/runner/wo...gerMessage.g.cs 0% 100% +100%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 16, 2026 19:10 UTC

Compile AG-UI SSE fallback tests for net8.0, exclude Foundry hosted-agent tests from the manual integration workflow, and return the test HTTP response directly.

This branch was successfully deployed

1 active and 1 inactive deployments
integration — 369acbe3 Deployed Nov 16, 2026 by rogerbarreto via dotnet-foundry-hosted-it #33109
github-app-auth — 369acbe3 Deployed Nov 16, 2026 by rogerbarreto via add_label #27917
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