Skip to content

.NET: MissingMethodException on AIProjectClient.GetAIAgent #2869

Closed

Description

@gopkumr

Trying to use Agent Framework with the v2 Prompt agent in Microsoft Foundry and receiving "Method not found" Exception.

Code

var aiProjectClient = new AIProjectClient(new Uri(configuration.AIProjectEndpoint), new AzureCliCredential());
 var existingAgents = aiProjectClient.Agents.GetAgents();
 var existingAgent = existingAgents.FirstOrDefault(q => q.Name == _agentName);
AIAgent agent = aiProjectClient.GetAIAgent(existingAgent);

Exception

System.MissingMethodException: Method not found: 'OpenAI.Responses.OpenAIResponseClient OpenAI.OpenAIClient.GetOpenAIResponseClient(System.String)'.
          at Microsoft.Agents.AI.AzureAI.AzureAIProjectChatClient..ctor(AIProjectClient aiProjectClient, AgentReference agentReference, String defaultModelId, ChatOptions chatOptions)
          at Microsoft.Agents.AI.AzureAI.AzureAIProjectChatClient..ctor(AIProjectClient aiProjectClient, AgentReference agentReference, String defaultModelId, ChatOptions chatOptions)
          at Microsoft.Agents.AI.AzureAI.AzureAIProjectChatClient..ctor(AIProjectClient aiProjectClient, AgentVersion agentVersion, ChatOptions chatOptions)
          at Microsoft.Agents.AI.AzureAI.AzureAIProjectChatClient..ctor(AIProjectClient aiProjectClient, AgentRecord agentRecord, ChatOptions chatOptions)
          at Azure.AI.Projects.AzureAIProjectChatClientExtensions.CreateChatClientAgent(AIProjectClient aiProjectClient, AgentRecord agentRecord, ChatClientAgentOptions agentOptions, Func`2 clientFactory, IServiceProvider services)
          at Azure.AI.Projects.AzureAIProjectChatClientExtensions.CreateChatClientAgent(AIProjectClient AIProjectClient, AgentRecord agentRecord, IList`1 tools, Func`2 clientFactory, Boolean requireInvocableTools, IServiceProvider services)
          at Azure.AI.Projects.AzureAIProjectChatClientExtensions.GetAIAgent(AIProjectClient aiProjectClient, AgentRecord agentRecord, IList`1 tools, Func`2 clientFactory, IServiceProvider services)

Tried adding the below nuget Packages in an attempt to find the missing method

  • Azure.AI.OpenAI 2.8.0-beta.1
  • Azure.AI.Projects 1.2.0-beta.5
  • Azure.AI.Projects.OpenAI 1.0.0-beta.5
  • Microsoft.Agents.AI 1.0.0-preview.251204.1
  • Microsoft.Agents.AI.AzureAI 1.0.0-preview.251204.1
  • Microsoft.Agents.AI.OpenAI 1.0.0-preview.251204.1
  • Microsoft.Extensions.AI 10.1.1
  • Microsoft.Extensions.AI.OpenAI 10.1.1-preview.1.25612.2

Activity

  1. added
    .NETUsage: [Issues, PRs], Target: .Net
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Dec 15, 2025
  2. added
    agentsUsage: [Issues, PRs], Target: Single agent
    and removed
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Dec 15, 2025
  3. markwallace-microsoft commented on Dec 15, 2025

    @markwallace-microsoft
    Contributor

    Gopakumar R (@gopkumr) Agent Framework is using 1.2.0-beta.3 of Azure.AI.Projects and it looks like there is a breaking change in the beta5 package. We will look to update this week.

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

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .NetagentsUsage: [Issues, PRs], Target: Single agent

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions