Skip to main content

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>.

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.