Radzen.AIChatService Error in 7.2.1 #1839

Closed
opened 2026-01-29 17:59:16 +00:00 by claunia · 2 comments
Owner

Originally created by @PietroDAttoma on GitHub (Aug 14, 2025).

I just updated to version 7.2.1 and now, when compiling, I get this error:

System.AggregateException: 'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Radzen.IAIChatService Lifetime: Scoped ImplementationType: Radzen.AIChatService': Unable to resolve service for type 'System.Net.Http.HttpClient' while attempting to activate 'Radzen.AIChatService'.)'

InvalidOperationException: Unable to resolve service for type 'System.Net.Http.HttpClient' while attempting to activate 'Radzen.AIChatService'.

I downgraded to version 7.2.0 and the error does not appear

Originally created by @PietroDAttoma on GitHub (Aug 14, 2025). I just updated to version 7.2.1 and now, when compiling, I get this error: System.AggregateException: 'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Radzen.IAIChatService Lifetime: Scoped ImplementationType: Radzen.AIChatService': Unable to resolve service for type 'System.Net.Http.HttpClient' while attempting to activate 'Radzen.AIChatService'.)' InvalidOperationException: Unable to resolve service for type 'System.Net.Http.HttpClient' while attempting to activate 'Radzen.AIChatService'. I downgraded to version 7.2.0 and the error does not appear
Author
Owner

@enchev commented on GitHub (Aug 15, 2025):

Make sure you have HttpClient before AddRadzenComponents() similar to our demos:
https://github.com/radzenhq/radzen-blazor/blob/master/RadzenBlazorDemos.Server/Program.cs#L20

@enchev commented on GitHub (Aug 15, 2025): Make sure you have HttpClient before AddRadzenComponents() similar to our demos: https://github.com/radzenhq/radzen-blazor/blob/master/RadzenBlazorDemos.Server/Program.cs#L20
Author
Owner

@PietroDAttoma commented on GitHub (Aug 16, 2025):

Thanks for the quick response. Following the demo, everything works fine now.
If I may offer a piece of advice, for those like me who are just starting to use the fantastic Radzen Blazor Components, it would be helpful to add this information to the "Get started" instructions webpage.

@PietroDAttoma commented on GitHub (Aug 16, 2025): Thanks for the quick response. Following the demo, everything works fine now. If I may offer a piece of advice, for those like me who are just starting to use the fantastic Radzen Blazor Components, it would be helpful to add this information to the "**Get started**" instructions webpage.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1839