Plan: pin NuGet package versions to 9.* for net9.0 compat

This commit is contained in:
EugeneTes
2026-08-15 11:30:49 +00:00
parent 1e2a60880e
commit 00cba42ba4

View File

@@ -293,11 +293,11 @@ Confirm `git status` does NOT list `backend/appsettings.Development.json`.
```bash ```bash
cd backend cd backend
dotnet add package Microsoft.EntityFrameworkCore dotnet add package Microsoft.EntityFrameworkCore --version 9.*
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 9.*
``` ```
No `--version` — the CLI resolves the latest stable compatible with the SDK (9.x on this project). `--version 9.*` pins to the 9.x major line. Without it, `dotnet add package` picks the absolute-latest stable (e.g. 10.x once released) which will not resolve against `net9.0``NU1202` error.
- [ ] **Step 2: Create the `Todo` entity** - [ ] **Step 2: Create the `Todo` entity**
@@ -409,9 +409,11 @@ git commit -m "Add EF Core, Npgsql, Todo entity, and AppDbContext"
```bash ```bash
cd backend cd backend
dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer --version 9.*
``` ```
Same reason as Task 4: pin the major to avoid picking a version incompatible with `net9.0`.
- [ ] **Step 2: Wire authentication in `Program.cs`** - [ ] **Step 2: Wire authentication in `Program.cs`**
Open `backend/Program.cs`. Add these two `using` directives at the top (below the existing `using` lines): Open `backend/Program.cs`. Add these two `using` directives at the top (below the existing `using` lines):