Skip to content

Upgrade solution from .NET 7 to .NET 9 - #73

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787842736-net9-upgrade
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787842736-net9-upgrade

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 27, 2026

Copy link
Copy Markdown

Summary

Retargets all six projects to net9.0 and moves the dependency stack to the current stable releases (EF Core / OpenAPI 9.0.19, Npgsql 9.0.x, HealthChecks.NpgSql 9.0.0, Swashbuckle 10.2.3, Mapster 10.0.12, test stack incl. xunit 2.9.3 — deliberately staying on xunit v2 to avoid a v3 test-code migration). Docker images and the CI workflow move to 9.0 (CI was still pinned to 6.0.x), and global.json pins the SDK to 9.0.317 with rollForward: latestFeature.

Only one code change was needed: GetConnectionString is nullable, so under the 9.x overloads the connection string is now resolved once and validated instead of being passed through twice:

-options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection"), ...)
-...AddNpgSql(builder.Configuration.GetConnectionString("DefaultConnection"), name: "SampleDB")
+var connectionString = builder.Configuration.GetConnectionString("DefaultConnection")
+    ?? throw new InvalidOperationException("DefaultConnection is not configured.");

Swagger stays Swashbuckle-based (not switched to the new Microsoft.AspNetCore.OpenApi document generation).

dotnet restore / build / test on .NET 9: build succeeded (2 pre-existing nullable warnings in EducationsControllerTests), 20/20 tests pass.

Link to Devin session: https://app.devin.ai/sessions/fa161b241b3d430fa67770922b66e680
Open in Devin Desktop: https://app.devin.ai/desktop/session/fa161b241b3d430fa67770922b66e680?variant=devin
Requested by: @detectiveharree


Note

Devin errored when opening this Pull Request as detectiveharree.
As a fallback, Devin opened this PR as itself.


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Devin Review (Staging)

Co-Authored-By: harrison.reeves <harrisonreeves00@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants