-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After update package 7.0.0 on asp.net core 6.0 Im geting error #1975
Comments
Hi, I've experienced it as well. Try installing |
See #1720 . This PR explains the problem. @phivanloi What packages exactly do you use? We can add reference to Microsoft.Bcl.AsyncInterfaces as we already did in #1720. |
Hi, I also had the same issue and also fixed it by adding However, this is more of a workaround than a fix, isn't it? Shouldn't |
It's hard to tell.
Please read #1692 (comment) . It looks like an issue on MS side. HealthChecks' packages are just intermediate victim. I'm open to suggestions and best practices. @corentinaltepe Please look into deps file in your output folder and search exact package that depends on Microsoft.Bcl.AsyncInterfaces. |
Hi @sungam3r. |
Also ran into this on our .NET 6 app. Caused by the dependency on Microsoft.Extensions.Diagnostics.HealthChecks v7, which brings in other .NET 7 deps. We've avoided using .NET 7 packages in our .NET 6 apps due to that not feeling right (does every .NET 7 package guarantee backwards compatibility with ASP.NET Core 6? Seems unlikely). Unless you add a TFM for .NET 6 that targets Microsoft.Extensions.Diagnostics.HealthChecks v6, looks like we'll be waiting to upgrade from v6 until we go to .NET 8. |
This happens even in .NET 7 with AspNetCore.HealthChecks.AzureStorage. |
To be honest, I'm not sure if it's related to the I've experienced it in a project which didn't use Health Checks. The setup was:
On running the web project the described errors occurs. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
When installing the version 7.0.0 packages of AspNetCore.HealthChecks.AzureServiceBus or AspNetCore.HealthChecks.AzureStorage to .net 7 projects it seems that the DLLs target .netstandard 2.0. The version 6 packages targeted .NETCoreApp, Version=v6.0 when installing to .net 6 project. Seems like a version mismatch in the libraries. .NET 7 shouldn't need to reference the Microsoft.Bcl.AsyncInterfaces library. EDIT: OK so this is a targeting issue. You'll want to multi target these libraries and add .net 7 target for version 7 packages. |
We had the same problem in ASP.NET Core application in .NET 6 project, when upgrading the AspNetCore.HealthChecks.Oracle nuget package from version 6.x to version 7.x Currently, the AspNetCore.HealthChecks.Oracle package version 7.x now has a dependency on Microsoft.Extensions.Diagnostics.HealthChecks (>= 7.0.9) Meanwhile, the AspNetCore.HealthChecks.Oracle package in version 6.x had this dependency: Microsoft.Extensions.Diagnostics.HealthChecks (>= 6.0.3) In fact, all nuget packages of Microsoft.Extension.* version 7.x run in .NET 6 just fine, without any problems (they all have a target on net6.0). So maybe it was not worth changing the minimum version in the dependency to Microsoft.Extensions.Diagnostics.HealthChecks. Please consider changing the dependency from Microsoft.Extensions.Diagnostics.HealthChecks (>= 7.0.9) to Microsoft.Extensions.Diagnostics.HealthChecks (>= 6.0.3), or having separate targets for net6.0 and net7.0. |
Well... Of course it's possible but I think it goes against current targeting design when v X.* versions of packages are targeted at v X.* version of NET. ping @unaizorrilla @adamsitnik |
If you are using .NET X you should be using X.* version of our packages. |
Guys, what do you think about #1980 (comment) ? |
I believe this is Microsoft's fault. They should either remove the unsupported TFMs from their packages and document the support policy, or fix the issue. I added a comment under what I believe to be the upstream issue to this one: dotnet/aspnetcore#45278 (comment) But in .NET 8, the issue seems to be resolved, somehow: dotnet/aspnetcore#45278 (comment) If this is not the case, though, releasing a workaround as part of AspNetCore.Diagnostics.HealthChecks before the upstream issue is fixed may still have value. The clients should not be forced to install Microsoft.Bcl.AsyncInterfaces in the correct version themselves. |
After update package 7.0.0 on asp.net core 6.0 Im geting error
The text was updated successfully, but these errors were encountered: