AspNetCore.Diagnostics.HealthChecks
AspNetCore.Diagnostics.HealthChecks copied to clipboard
Could not load file or assembly Microsoft.Bcl.AsyncInterfaces .NET 8
What happened:
Recently upgraded my web app to .NET 8, queue healthchecks where working fine before upgrading. Other healthchecks like postgre sql database are still working fine. Im getting the following error in Azure:
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
What you expected to happen:
No exception, healthcheck runs as expected
How to reproduce it (as minimally and precisely as possible):
Add a healthcheck to a service bus
Source code sample:
var connectionString = "sb endpoint here";
.AddAzureServiceBusQueueMessageCountThreshold(connectionString , "YourQueueNameHere",
"Message Count", conf =>
{
conf.ActiveMessages = new AzureServiceBusQueueMessagesCountThreshold
{
DegradedThreshold = 20000,
UnhealthyThreshold = 100000
};
});
Anything else we need to know?:
Environment:
- .NET Core version: .NET 8
- Healthchecks version
- Operative system: Windows x64
- Others:
We encountered this as well, for the moment we reverted to AspNetCore.HealthChecks.AzureServiceBus 7.0.0 as it seems to work
We are seeing the same thing for AspNetCore.HealthChecks.Azure.Storage.Blobs.
"StorageConnectionString":{"data":{},"description":"Could not load file or assembly \u0027Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51\u0027. The system cannot find the file specified."
- Edit I fixed this by explicitly installing the Microsoft.Bcl.AsyncInterfaces 8.0.0 package.
@sungam3r This seems to be a duplicate of #2084.