Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 771 forks source link

Could not load file or assembly Microsoft.Bcl.AsyncInterfaces .NET 8 #2163

Closed nschoenberg closed 3 months ago

nschoenberg commented 4 months ago

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:

  • Operative system: Windows x64
  • Others:
ben-002 commented 4 months ago

We encountered this as well, for the moment we reverted to AspNetCore.HealthChecks.AzureServiceBus 7.0.0 as it seems to work

throwaway34059 commented 4 months ago

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

hschink commented 4 months ago

@sungam3r This seems to be a duplicate of #2084.