Skip to content

Conversation

@eerhardt
Copy link
Member

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 #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

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
@eerhardt eerhardt requested a review from joperezr October 17, 2025 22:19
@eerhardt eerhardt added the Servicing-consider Issue for next servicing release review label Oct 17, 2025
Copilot AI review requested due to automatic review settings October 17, 2025 22:19
Copy link
Contributor

Copilot AI left a 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.

@github-actions
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12138

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12138"

@joperezr joperezr added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 17, 2025
@joperezr joperezr merged commit c69f5f7 into dotnet:release/9.5 Oct 17, 2025
312 checks passed
@eerhardt eerhardt deleted the FixRabbitMQ branch October 20, 2025 14:33
This was referenced Oct 23, 2025
This was referenced Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants