-
Notifications
You must be signed in to change notification settings - Fork 757
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
Regression: In place Update of Microsoft.Extensions.* to Version 9.0.0 in a .NET 8 application does not work. #5644
Comments
Which extensions libraries are you having troubles with? Microsoft.Extensions.* come from at least three different repos. Please note, the libraries hosted in this repo are covered by the specific support policy: https://dotnet.microsoft.com/platform/support/policy/extensions. |
Where should I know where to look which is the supported repository, I wrote it here because of the DependencyInjection Exceptions. And I looked in the repository if there is the source of that. Make it easy to support problems. These are the direct references Extensions in our Project, I upgraded all of these to 9.0.0, but I don't know about the transitive dependencies. It may be possible to upgrade to 9.0.0 as the Transitive ones. To add all Extensions to the Directory.Packages.props files. If you need additional information, please let me HOW to give you useful Info, and asking for a minimal reproduction is not helpful with this kind of exception so early in the starting phase of a complex software. I can provide further Information you request, be willing to run something to gather more Information for you. Like seeing which dependencies are finally being used in the application. Project A: <PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="8.0.11" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="8.0.11" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.10.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.10.0" /> Project B: <PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="8.0.11" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.10.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.10.0" /> |
It seemed that JUST the Dependency Validation was the problem (first impression after giving it some investigation), then I dug a little. Then I located the issue in our code, this breaking change in 9.0.0 https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/9.0/hostbuilder-validation |
One way (but not necessarily intuitive) to find out is to look at the package in NuGet and click on the The packages are built with Git metadata that will link you to the repo where the source is, so in the case of |
DependencyInjection comes from dotnet/runtime, it has some additional implementations in dotnet/aspnetcore and some implementations in this repo. I asked you which one you're having troubles with so we could direct your issue to the right team.
Suggestions are welcome.
The issue is with the OT then?
Put yourself in our shoes - without a small repro or without knowing what exactly is causing an issue we can't be very helpful.
So, is your issue is resolved, or do you require some further assistance? |
Description
Because of open-telemetry/opentelemetry-dotnet#5973
I tried to update our .NET 8 Projects to use V9.0.0 of
Microsoft.Extensions.*
andSystem.Text.*
, but stay on .NET 8 as a TFM.But we have now we have strange but Dependency Injection Issues, which do not happen with the v8.0.x packages.
It could be wrong stuff in our code, or other dependencies. I tested two Projects.
Do we need to update more? The Applications are compiling fine.
Reproduction Steps
I updated two of our Projects (as a test) to use the V9.0.0 Extensions with these two RegEx Replaces (we are using Central Package Management), but the TargetFramework is still .NET 8.0 and also the .NET 9 SDK is not installed. yet.
Everything compiles fine. But does not run.
But at runtime we have IoC Issues, locally and on the Buildserver.
Expected behavior
Just works ;)
Actual behavior
IoC is not resolving some Services (for whatever Reason). IoC Problem in both Projects, but not on everything.
it could be a IoC Construction Problem on our Side, but then the message is not very helpful. Like when we put Scoped Services in Singleton we get a helpful message).
Regression?
I think so, just updated the Dependencies, it break the Application.
Known Workarounds
No response
Configuration
.NET SDK:
Version: 8.0.403
Commit: c64aa40a71
Workload version: 8.0.400-manifests.e99c892e
MSBuild version: 17.11.9+a69bbaaf5
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.403\
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[aspire]
Installation Source: VS 17.11.35327.3
Manifest Version: 8.1.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.1.0\WorkloadManifest.json
Install Type: FileBased
Host:
Version: 8.0.10
Architecture: x64
Commit: 81cabf2857
.NET SDKs installed:
2.2.207 [C:\Program Files\dotnet\sdk]
6.0.427 [C:\Program Files\dotnet\sdk]
8.0.306 [C:\Program Files\dotnet\sdk]
8.0.403 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Other information
No response
The text was updated successfully, but these errors were encountered: