Skip to content

.NET: Address Suppress Experimental Features for Docker Build - #4641

Merged
Roger Barreto (rogerbarreto) merged 2 commits into
microsoft:mainfrom
rogerbarreto:issues/4365-deploy-agent-hosted-mcp
Mar 13, 2026
Merged

Roger Barreto (rogerbarreto) merged 2 commits into
microsoft:mainfrom
rogerbarreto:issues/4365-deploy-agent-hosted-mcp

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

…I warnings

Add #pragma warning disable directives to suppress experimental API
diagnostics that cause build errors in Docker isolation (where repo-level
Directory.Build.props is not inherited):

- AgentWithHostedMCP: suppress MEAI001 (HostedMcpServerTool) and OPENAI001
  (GetResponsesClient)
- FoundrySingleAgent: suppress CA2252 (AIProjectClient preview features)
- FoundryMultiAgent: suppress CA2252 (AIProjectClient preview features)

Fixes microsoft#4365
Copilot AI review requested due to automatic review settings March 12, 2026 09:57
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added the .NET Usage: [Issues, PRs], Target: .Net label Mar 12, 2026
@github-actions github-actions Bot changed the title .Net: Address Suppress Experimental Features for Docker Build .NET: Address Suppress Experimental Features for Docker Build Mar 12, 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.

Pull request overview

Suppresses preview/experimental analyzer warnings in .NET hosted-agent samples so Docker builds (and other warnings-as-errors builds) succeed, addressing deployment failures for AgentWithHostedMCP.

Changes:

  • Disable CA2252 in Foundry hosted-agent samples that use preview AIProjectClient/Agents APIs.
  • Disable experimental diagnostics (MEAI001, OPENAI001) in AgentWithHostedMCP for Hosted MCP tooling and Responses client usage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
dotnet/samples/05-end-to-end/HostedAgents/FoundrySingleAgent/Program.cs Suppresses CA2252 preview-feature warning so the sample builds under warnings-as-errors.
dotnet/samples/05-end-to-end/HostedAgents/FoundryMultiAgent/Program.cs Suppresses CA2252 preview-feature warning so the sample builds under warnings-as-errors.
dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/Program.cs Suppresses MEAI001/OPENAI001 experimental warnings so the sample builds under warnings-as-errors.

@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Mar 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Mar 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Mar 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Mar 13, 2026
Merged via the queue into microsoft:main with commit 0009e33 Mar 13, 2026
26 checks passed

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: Failed to deploy service for sample AgentWithHostedMCP

5 participants