Migrate from .NET 7 to .NET 9 - #53
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- Update TargetFramework to net9.0 in all 6 csproj files - Update NuGet packages to .NET 9 compatible versions: - EF Core packages → 9.0.17 - Npgsql packages → 9.0.4/9.0.5 - ASP.NET Core OpenApi → 9.0.17 - AspNetCore.HealthChecks.NpgSql → 9.0.0 - Swashbuckle.AspNetCore → 6.9.0 - Mapster → 7.4.0 - FakeItEasy → 8.3.0 - xunit → 2.9.3, xunit.runner.visualstudio → 2.8.2 - Microsoft.NET.Test.Sdk → 17.12.0 - coverlet.collector → 6.0.4 - Update Dockerfile base images to .NET 9.0 - Update GitHub Actions workflow: dotnet-version 9.0.x, checkout@v4, setup-dotnet@v4 - Add global.json to pin SDK version 9.0.100 with latestMinor rollForward Co-Authored-By: harrison.reeves <harrisonreeves00@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
| </PackageReference> | ||
| <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" /> | ||
| <PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" /> |
There was a problem hiding this comment.
🚩 Swashbuckle.AspNetCore may have compatibility concerns with .NET 9
Swashbuckle.AspNetCore was dropped as the default OpenAPI provider in .NET 9 templates in favor of the built-in Microsoft.AspNetCore.OpenApi. The PR updates Swashbuckle to version 6.9.0 (src/WebApi/WebApi.csproj:16). While recent Swashbuckle versions do work with .NET 9, the project is now in maintenance-only mode. The PR already includes Microsoft.AspNetCore.OpenApi 9.0.17 as a dependency but Program.cs still uses AddSwaggerGen()/UseSwagger()/UseSwaggerUI(). Worth verifying that v6.9.0 is a valid published version and considering whether to migrate to the built-in OpenAPI support.
Was this helpful? React with 👍 or 👎 to provide feedback.
| <PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="7.0.0" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.9" /> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.10"> | ||
| <PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="9.0.0" /> |
There was a problem hiding this comment.
🚩 AspNetCore.HealthChecks.NpgSql v9.0.0 may have breaking API changes
The AddNpgSql health check call in src/WebApi/Program.cs:16 passes a raw connection string as the first argument. In newer major versions of the AspNetCore.HealthChecks.NpgSql package (8.0+), the API signature changed to use NpgsqlDataSource or configuration callbacks instead of raw connection strings. If this overload was removed in v9.0.0, the build will fail. This would be caught by the compiler, but is worth verifying before merge to avoid CI surprises.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Migrates the entire solution from .NET 7 to .NET 9 — all project files, NuGet dependencies, Docker images, and CI workflow.
TargetFramework:
net7.0→net9.0in all 6.csprojfiles.NuGet packages updated to .NET 9–compatible stable versions:
Microsoft.EntityFrameworkCore.*) →9.0.179.0.4/9.0.5Microsoft.AspNetCore.OpenApi→9.0.17AspNetCore.HealthChecks.NpgSql→9.0.0Swashbuckle.AspNetCore6.5.0→6.9.0Mapster7.3.0→7.4.0FakeItEasy→8.3.0,xunit→2.9.3,xunit.runner.visualstudio→2.8.2,Microsoft.NET.Test.Sdk→17.12.0,coverlet.collector→6.0.4Dockerfile: base images
aspnet:7.0/sdk:7.0→aspnet:9.0/sdk:9.0.CI workflow (
.github/workflows/dotnet.yml):dotnet-version: 6.0.x→9.0.xactions/checkout@v3→v4,actions/setup-dotnet@v3→v4global.jsonadded to pin SDK9.0.100withrollForward: latestMinor.Build and all 20 tests pass locally on .NET 9.0.315.
Link to Devin session: https://app.devin.ai/sessions/02b2753ec8aa4e37903031e3141ded4c
Requested by: @detectiveharree
Devin Review