Skip to main content

36 posts tagged with "Microsoft 365 Agents SDK"

Microsoft 365 Agents SDK for Building Intelligent Agents

View All Tags

Fixed: "error CS0104: 'RouteBuilder' is an ambiguous reference between 'Microsoft.Agents.Builder.App.RouteBuilder' and 'Microsoft.AspNetCore.Routing.RouteBuilder'"

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

I wrote RouteBuilder.Create() in a Microsoft 365 Agents SDK agent, and the build stopped with error CS0104: two different RouteBuilder classes were in scope, the Agents SDK's and ASP.NET Core's. I had only imported one of them. The other came in through the web project's implicit usings, and a one-line alias fixes it.

Fixed: "warning CS0618: 'AgentApplication.OnActivity(RouteSelector, RouteHandler, ushort, string[], bool)' is obsolete" in the Microsoft 365 Agents SDK

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

I gave a Microsoft 365 Agents SDK agent one route that catches every activity, the short way: OnActivity with a selector that always returns true. The agent worked, but the build warned CS0618. In version 1.9.205 that overload is obsolete, and the SDK's own source shows exactly what replaces it.

Fixed: "You must install or update .NET to run this application" (Framework 'Microsoft.NETCore.App', version '8.0.0')

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

I created a C# agent project with the Microsoft 365 Agents Toolkit CLI, built it without a single warning, and ran it. It stopped before running a line of my code: You must install or update .NET to run this application. The project targeted .NET 8, my machine had only .NET 10, and .NET 8 was already out of support.

Fixed: "npm warn install-scripts 3 packages had install scripts blocked because they are not covered by allowScripts" (Microsoft 365 Agents Toolkit CLI)

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

I installed the Microsoft 365 Agents Toolkit CLI and npm finished with a warning: three packages had their install scripts blocked. The CLI worked anyway, so the warning looked harmless. It wasn't: one of the blocked scripts belongs to keytar, the library the CLI uses to encrypt the sign-in tokens it saves on your disk.

Fix: ILogger Type Mismatch in AdapterWithErrorHandler CloudAdapter

· 2 min read
Jagdish Kumawat
Founder @ Dewiride

When creating an AdapterWithErrorHandler class that inherits from CloudAdapter, you might encounter this compile error:

Argument 3: cannot convert from 'Microsoft.Extensions.Logging.ILogger<Microsoft.Agents.Hosting.AspNetCore.IAgentHttpAdapter>' to 'Microsoft.Extensions.Logging.ILogger<Microsoft.Agents.Hosting.AspNetCore.CloudAdapter>'

This happens because you're passing ILogger<IAgentHttpAdapter> to the CloudAdapter base constructor, but it expects ILogger<CloudAdapter>.