Can't use new Npgsql.EntityFrameworkCore.PostgreSQL 9.x types with Aspire.Npgsql.EntityFrameworkCore.PostgreSQL 9.x in .NET 8 #7749
Labels
area-integrations
Issues pertaining to Aspire Integrations packages
postgres
Issues related to Postgres integrations
Is there an existing issue for this?
Describe the bug
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL Version="9.0.0" depends on Npgsql.EntityFrameworkCore.PostgreSQL >= 8.0.11 when you target the net8.0 platform.
However, Npgsql.EntityFrameworkCore.PostgreSQL 9.0.3 also targets the net8.0 platform, so Aspire.Npgsql.EntityFrameworkCore.PostgreSQL should depend on However, Npgsql.EntityFrameworkCore.PostgreSQL >= 9.0.3.
Because of this, if you try to use Aspire.Npgsql.EntityFrameworkCore.PostgreSQL when targeting .NET 8, you lose all the new stuff available in Npgsql.EntityFrameworkCore.PostgreSQL 9.0.x, like the ability to use ConfigureDataSource, as in here:
In fact, if in your .NET 8 project you switch from Npgsql.EntityFrameworkCore.PostgreSQL to Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (both version 9.x), your project immediately breaks, should should not be the case.
Expected Behavior
In .NET 8 projects, when using Aspire.Npgsql.EntityFrameworkCore.PostgreSQL 9.x you should be able to use everything available in Npgsql.EntityFrameworkCore.PostgreSQL 9.x.
Steps To Reproduce
dotnet add package Aspire.Npgsql.EntityFrameworkCore.PostgreSQL --version 9.0.0
Exceptions (if any)
No response
.NET Version info
.NET SDK:
Version: 8.0.406
Commit: 73c77e847d
Workload version: 8.0.400-manifests.f7661779
MSBuild version: 17.11.22+17752cebd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.406\
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.
Host:
Version: 8.0.13
Architecture: x64
Commit: eba546b0f0
.NET SDKs installed:
8.0.406 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Anything else?
ASP.NET Core version: 8
.NET Aspire version: 9
IDE: VS Code
The text was updated successfully, but these errors were encountered: