Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find AddHealthChecks().AddUrlGroup() not found on .NET Core 2.2

Tags:

.net

.net-core

I am trying to health check an endpoint in .NET Core using Microsoft.Extensions.Diagnostics.HealthChecks. Most of the samples code i found is like below

services.AddHealthChecks()
            .AddUrlGroup(new Uri("** API 1 ENDPOINT **"), "API 1");

But i am getting reference error for same telling IHealthChecksBuilder' does not contain a definition for 'AddUrlGroup' and no accessible extension method 'AddUrlGroup' accepting a first argument of type 'IHealthChecksBuilder' could be found

Is there any other reference for AddUrlGroup or it is not available in .net core 2.2?

like image 376
RX100 Avatar asked Jan 22 '20 06:01

RX100


1 Answers

Install below NuGet Package will solve your issue

AspNetCore.HealthChecks.Uris

Install-Package AspNetCore.HealthChecks.Uris -v 2.2

like image 108
Yergali Adambayev Avatar answered Nov 05 '22 12:11

Yergali Adambayev