Skip to content

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

Merged
rogerbarreto merged 2 commits intomicrosoft:mainfrom
rogerbarreto:issues/4365-deploy-agent-hosted-mcp
Mar 13, 2026
Merged

.NET: Address Suppress Experimental Features for Docker Build#4641
rogerbarreto merged 2 commits intomicrosoft: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
@rogerbarreto rogerbarreto self-assigned this 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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 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 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 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: Failed to deploy service for sample AgentWithHostedMCP

5 participants