-
Couldn't load subscription status.
- Fork 712
[release/9.5] Multi-target RabbitMQ and Redis client libraries #12138
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
Conversation
Users encountered a NuGet downgrade error (NU1605) when using Aspire client library packages in .NET 9 projects. This occurred because: 1. Component packages targeted only `net8.0`, which references `Microsoft.Extensions.Hosting.Abstractions 8.0.1` 2. They depend on `Microsoft.Extensions.DependencyInjection.AutoActivation 9.9.0` 3. AutoActivation 9.9.0 requires `Microsoft.Extensions.Hosting.Abstractions >= 9.0.9` 4. This created a downgrade conflict when the packages were consumed by .NET 9 projects Contributes to dotnet#11888
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Purpose: Multi-target RabbitMQ and Redis component and test projects to include net9 (via $(AllTargetFrameworks)) and eliminate NuGet downgrade (NU1605) conflicts involving Microsoft.Extensions.Hosting.Abstractions.
- Replace single TargetFramework with TargetFrameworks across component and related test projects.
- Enable packaging of libraries for multiple TFMs to satisfy dependency version requirements in .NET 9.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.StackExchange.Redis.Tests/Aspire.StackExchange.Redis.Tests.csproj | Multi-target test project to align with components and validate across all frameworks. |
| tests/Aspire.StackExchange.Redis.OutputCaching.Tests/Aspire.StackExchange.Redis.OutputCaching.Tests.csproj | Multi-target output caching Redis tests for net9 compatibility. |
| tests/Aspire.StackExchange.Redis.DistributedCaching.Tests/Aspire.StackExchange.Redis.DistributedCaching.Tests.csproj | Multi-target distributed caching Redis tests. |
| tests/Aspire.RabbitMQ.Client.v7.Tests/Aspire.RabbitMQ.Client.v7.Tests.csproj | Multi-target RabbitMQ v7 client tests for expanded TFM coverage. |
| tests/Aspire.RabbitMQ.Client.Tests/Aspire.RabbitMQ.Client.Tests.csproj | Multi-target RabbitMQ v6 client tests; retains RABBITMQ_V6 define constant. |
| src/Components/Aspire.StackExchange.Redis/Aspire.StackExchange.Redis.csproj | Multi-target Redis client component for proper dependency resolution. |
| src/Components/Aspire.StackExchange.Redis.OutputCaching/Aspire.StackExchange.Redis.OutputCaching.csproj | Multi-target Redis Output Caching component. |
| src/Components/Aspire.StackExchange.Redis.DistributedCaching/Aspire.StackExchange.Redis.DistributedCaching.csproj | Multi-target Redis Distributed Caching component. |
| src/Components/Aspire.RabbitMQ.Client/Aspire.RabbitMQ.Client.csproj | Multi-target RabbitMQ client component. |
| src/Components/Aspire.RabbitMQ.Client.v7/Aspire.RabbitMQ.Client.v7.csproj | Multi-target RabbitMQ v7 client component. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12138Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12138" |
Users encountered a NuGet downgrade error (NU1605) when using Aspire client library packages in .NET 9 projects.
This occurred because:
net8.0, which referencesMicrosoft.Extensions.Hosting.Abstractions 8.0.1Microsoft.Extensions.DependencyInjection.AutoActivation 9.9.0Microsoft.Extensions.Hosting.Abstractions >= 9.0.9Contributes to #11888
Customer Impact
Users can get restore errors with our packages.
Testing
Manually ensured the new package restores clean.
Risk
Low to medium. We are adding a net9 TFM to our package, which we didn't have before. It shouldn't cause problems, but may.
Regression?
Yes