Skip to content

.NET: Bump Azure.AI.Projects to 2.0.0 GA#5060

Merged
rogerbarreto merged 2 commits intomicrosoft:mainfrom
rogerbarreto:aip-bump-2.0
Apr 2, 2026
Merged

.NET: Bump Azure.AI.Projects to 2.0.0 GA#5060
rogerbarreto merged 2 commits intomicrosoft:mainfrom
rogerbarreto:aip-bump-2.0

Conversation

@rogerbarreto
Copy link
Copy Markdown
Member

Summary

Upgrades \Azure.AI.Projects\ from \2.0.0-beta.2\ to \2.0.0\ GA, along with transitive dependency bumps and all breaking change adaptations.

Package Version Changes (CPM)

Package Old New
Azure.AI.Projects 2.0.0-beta.2 2.0.0
Azure.Identity 1.19.0 1.20.0
System.ClientModel 1.9.0 1.10.0

Breaking Changes Addressed

Per Azure.AI.Projects.Agents 2.0.0 release notes:

Old Name New Name
\AgentVersion\ \ProjectsAgentVersion\
\AgentRecord\ \ProjectsAgentRecord\
\AgentDefinition\ \ProjectsAgentDefinition\
\AgentVersionCreationOptions\ \ProjectsAgentVersionCreationOptions\
\PromptAgentDefinition\ \DeclarativeAgentDefinition\
\AgentTool\ \ProjectsAgentTool\
\AgentsClient\ \AgentAdministrationClient\
.Agents\ (property) .AgentAdministrationClient\

Per Azure.AI.Projects 2.0.0 release notes:

  • Memory types moved to \Azure.AI.Projects.Memory\ namespace

Validation

  • ✅ Full solution build passes
  • ✅ Foundry unit tests: 153/153 passed
  • ✅ All unit tests: 22/24 projects pass (2 pre-existing failures unrelated to this change)
  • ✅ Foundry integration tests: 43 passed, 24 skipped (expected)
  • ✅ \dotnet format --verify-no-changes\ passes on all affected projects (Docker, SDK 10.0)

Notes

  • HostedAgents samples (opt-out of CPM) are not updated in this PR
  • AGENTS.md updated with BOM encoding and output capture conventions

- Update Azure.AI.Projects from 2.0.0-beta.2 to 2.0.0 in CPM
- Update Azure.Identity from 1.19.0 to 1.20.0 (transitive dep)
- Update System.ClientModel from 1.9.0 to 1.10.0 (transitive dep)
- Rename types per Azure.AI.Projects.Agents 2.0.0 breaking changes:
  - AgentVersion -> ProjectsAgentVersion
  - AgentRecord -> ProjectsAgentRecord
  - AgentDefinition -> ProjectsAgentDefinition
  - AgentVersionCreationOptions -> ProjectsAgentVersionCreationOptions
  - PromptAgentDefinition -> DeclarativeAgentDefinition
  - AgentTool -> ProjectsAgentTool
  - AgentsClient -> AgentAdministrationClient
  - .Agents property -> .AgentAdministrationClient
- Add using Azure.AI.Projects.Memory namespace (types moved)
- Update AGENTS.md with BOM and output capture conventions
Copilot AI review requested due to automatic review settings April 2, 2026 13:16
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET workflows Related to Workflows in agent-framework labels Apr 2, 2026
@github-actions github-actions bot changed the title Bump Azure.AI.Projects to 2.0.0 GA .NET: Bump Azure.AI.Projects to 2.0.0 GA Apr 2, 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

Updates the .NET Foundry/Agents integration to align with Azure.AI.Projects 2.0.0 GA (and related dependency bumps), including adapting to the SDK’s breaking renames for agent administration, agent/version types, and declarative definitions, plus namespace moves for Memory types.

Changes:

  • Bump CPM package versions: Azure.AI.Projects → 2.0.0, Azure.Identity → 1.20.0, System.ClientModel → 1.10.0.
  • Migrate agent administration usage from AIProjectClient.Agents to AIProjectClient.AgentAdministrationClient and update renamed agent types (ProjectsAgent*) across src/tests/samples.
  • Update Foundry memory usage to the new Azure.AI.Projects.Memory namespace.

Reviewed changes

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

Show a summary per file
File Description
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/VisionAgentProvider.cs Update integration test agent creation to ProjectsAgentVersion + DeclarativeAgentDefinition.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgentProvider.cs Update integration test agent creation to new agent/version + definition types.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/PoemAgentProvider.cs Update agent creation to ProjectsAgentVersion and declarative definitions.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/MathChatAgentProvider.cs Update agent creation + declarative agent definitions for student/teacher.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/MarketingAgentProvider.cs Update definitions and tool factory type name to ProjectsAgentTool (commented).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/FunctionToolAgentProvider.cs Update agent creation + declarative definition typing for function tool agent.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/AgentProvider.cs Base provider now uses ProjectsAgentVersion enumeration.
dotnet/tests/Microsoft.Agents.AI.Foundry.UnitTests/TestDataUtil.cs Test JSON helper updated to ProjectsAgentDefinition serialization.
dotnet/tests/Microsoft.Agents.AI.Foundry.UnitTests/AzureAIProjectChatClientExtensionsTests.cs Unit tests updated for ProjectsAgent* and declarative definitions/tool factories.
dotnet/tests/Foundry.IntegrationTests/Memory/FoundryMemoryProviderTests.cs Add Azure.AI.Projects.Memory using for moved memory types.
dotnet/tests/Foundry.IntegrationTests/FoundryVersionedAgentFixture.cs Fixture updated to AgentAdministrationClient + ProjectsAgentVersionCreationOptions.
dotnet/tests/Foundry.IntegrationTests/FoundryVersionedAgentCreateTests.cs Integration tests updated for AgentAdministrationClient, declarative definitions, tool factories.
dotnet/src/Shared/Foundry/Agents/AgentFactory.cs Shared agent creation helper migrated to new agent admin client + types.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative.Foundry/AzureAgentProvider.cs Workflow declarative provider updated to ProjectsAgentVersion and new agent admin client.
dotnet/src/Microsoft.Agents.AI.Foundry/Memory/MemoryStoreExtensions.cs Update memory namespace imports (Azure.AI.Projects.Memory).
dotnet/src/Microsoft.Agents.AI.Foundry/Memory/FoundryMemoryProvider.cs Update memory namespace imports (Azure.AI.Projects.Memory).
dotnet/src/Microsoft.Agents.AI.Foundry/FoundryAITool.cs Switch wrapper to ProjectsAgentTool and adjust docs accordingly.
dotnet/src/Microsoft.Agents.AI.Foundry/AzureAIProjectChatClientExtensions.cs Update AsAIAgent overloads and internal plumbing to ProjectsAgent* + declarative definitions.
dotnet/src/Microsoft.Agents.AI.Foundry/AzureAIProjectChatClient.cs Update stored agent metadata/service retrieval to ProjectsAgentRecord/Version + declarative model extraction.
dotnet/samples/05-end-to-end/A2AClientServer/A2AServer/HostAgentFactory.cs Sample now queries agent via AgentAdministrationClient.
dotnet/samples/03-workflows/Declarative/ToolApproval/Program.cs Samples updated to DeclarativeAgentDefinition.
dotnet/samples/03-workflows/Declarative/StudentTeacher/Program.cs Samples updated to DeclarativeAgentDefinition.
dotnet/samples/03-workflows/Declarative/Marketing/Program.cs Samples updated to declarative defs + ProjectsAgentTool references (commented).
dotnet/samples/03-workflows/Declarative/InvokeMcpTool/Program.cs Sample updated to declarative definitions.
dotnet/samples/03-workflows/Declarative/InvokeFunctionTool/Program.cs Sample updated to declarative definitions and typing.
dotnet/samples/03-workflows/Declarative/InputArguments/Program.cs Sample updated to declarative definitions.
dotnet/samples/03-workflows/Declarative/HostedWorkflow/Program.cs Workflow sample updated to ProjectsAgentVersion + declarative definitions.
dotnet/samples/03-workflows/Declarative/FunctionTools/Program.cs Sample updated to declarative definitions and typing.
dotnet/samples/03-workflows/Declarative/DeepResearch/Program.cs Sample updated to declarative definitions + ProjectsAgentTool OpenAPI tool creation.
dotnet/samples/03-workflows/Declarative/CustomerSupport/Program.cs Sample updated to declarative definitions.
dotnet/samples/03-workflows/Agents/FoundryAgent/Program.cs Sample updated to AgentAdministrationClient + ProjectsAgentVersionCreationOptions.
dotnet/samples/02-agents/ModelContextProtocol/FoundryAgent_Hosted_MCP/Program.cs Sample updated to AgentAdministrationClient + new creation options/types.
dotnet/samples/02-agents/AgentWithRAG/AgentWithRAG_Step04_FoundryServiceRAG/Program.cs Sample updated to AgentAdministrationClient + new creation options/types.
dotnet/samples/02-agents/AgentsWithFoundry/Agent_Step22_MemorySearch/Program.cs Add Azure.AI.Projects.Memory import for moved memory types.
dotnet/samples/02-agents/AgentsWithFoundry/Agent_Step00_FoundryAgentLifecycle/Program.cs Sample updated to AgentAdministrationClient + new creation options/types.
dotnet/samples/02-agents/Agents/Agent_Step07_AsMcpTool/Program.cs Sample updated to AgentAdministrationClient + new creation options/types.
dotnet/samples/02-agents/AgentProviders/Agent_With_AzureAIProject/Program.cs Sample updated to new admin client + projects agent types.
dotnet/Directory.Packages.props CPM version bumps for Azure.AI.Projects/Azure.Identity/System.ClientModel.
dotnet/AGENTS.md Add conventions for capturing dotnet command output and preserving UTF-8 BOM.
Comments suppressed due to low confidence (1)

dotnet/src/Microsoft.Agents.AI.Foundry/AzureAIProjectChatClientExtensions.cs:402

  • promptAgentDefinition is typed as DeclarativeAgentDefinition, which is misleading and makes the surrounding code harder to follow. Rename the local to reflect the actual type (e.g., declarativeAgentDefinition).
        if (agentDefinition is DeclarativeAgentDefinition promptAgentDefinition)
        {
            agentOptions.ChatOptions ??= chatOptions?.Clone() ?? new();
            agentOptions.ChatOptions.Instructions = promptAgentDefinition.Instructions;
            agentOptions.ChatOptions.Temperature = promptAgentDefinition.Temperature;

- Rename AIProjectClient parameter to aiProjectClient in AsChatClientAgent overloads
- Fix XML doc: ProjectsAgentTool namespace from Azure.AI.Projects.OpenAI to Azure.AI.Projects.Agents
- Rename test method to reflect DeclarativeAgentDefinition terminology
@rogerbarreto rogerbarreto self-assigned this Apr 2, 2026
@rogerbarreto rogerbarreto moved this to In Review in Agent Framework Apr 2, 2026
@rogerbarreto rogerbarreto added this pull request to the merge queue Apr 2, 2026
Merged via the queue into microsoft:main with commit b0613a8 Apr 2, 2026
22 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Agent Framework Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET workflows Related to Workflows in agent-framework

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants