Files
Mimante/.github/upgrades/plan.md
T

319 lines
12 KiB
Markdown

# .NET 10.0 Upgrade Plan — AutoBidder Solution
## Table of Contents
- [1. Executive Summary](#1-executive-summary)
- [2. Migration Strategy](#2-migration-strategy)
- [3. Detailed Dependency Analysis](#3-detailed-dependency-analysis)
- [4. Project-by-Project Plans](#4-project-by-project-plans)
- [4.1 AutoBidder.csproj](#41-autobiddercsproj)
- [5. Package Update Reference](#5-package-update-reference)
- [6. Breaking Changes Catalog](#6-breaking-changes-catalog)
- [7. Risk Management](#7-risk-management)
- [8. Testing & Validation Strategy](#8-testing--validation-strategy)
- [9. Complexity & Effort Assessment](#9-complexity--effort-assessment)
- [10. Source Control Strategy](#10-source-control-strategy)
- [11. Success Criteria](#11-success-criteria)
---
## 1. Executive Summary
### Scenario
Upgrade the **AutoBidder** Blazor/ASP.NET Core solution from **.NET 8.0** to **.NET 10.0 (LTS)**.
### Scope
| Metric | Value |
|---|---|
| Total Projects | 1 |
| Total NuGet Packages | 3 (2 need upgrade, 1 compatible) |
| Total Lines of Code | 14,361 |
| Total Code Files | 50 |
| API Incompatibilities | 0 |
| Security Vulnerabilities | 0 |
| Estimated LOC Impact | 0+ (minimal) |
### Target State
- All projects targeting `net10.0`
- All NuGet packages updated to .NET 10 compatible versions
- Solution builds with 0 errors
- No security vulnerabilities
### Selected Strategy
**All-At-Once Strategy** — All projects upgraded simultaneously in a single atomic operation.
**Rationale**:
- 1 project (small solution)
- Currently on .NET 8.0 (modern SDK-style)
- Zero project-to-project dependencies
- All packages have known target framework versions available
- No API incompatibilities detected
- No security vulnerabilities
### Complexity Classification
**Simple** — 1 project, dependency depth 0, no high-risk indicators, no vulnerabilities.
**Iteration strategy**: Fast batch (2-3 detail iterations covering all sections).
### Critical Issues
- ?? `Npgsql.EntityFrameworkCore.PostgreSQL` 8.0.0 is marked compatible but has no suggested new version — verify compatibility with EF Core 10.0.5 at build time.
## 2. Migration Strategy
### Approach: All-At-Once
The entire solution is upgraded in a **single coordinated atomic operation**. There are no intermediate states — the project file, all package references, and any required code modifications are applied together.
### Justification
- **1 project** — no dependency ordering complexity
- **0 inter-project dependencies** — no phasing required
- **0 API incompatibilities** — minimal risk of breaking changes
- **Low difficulty** rating from assessment
- **SDK-style project** — clean project file structure
- All packages have target versions or are compatible
### Execution Approach
All operations are performed as a unified upgrade:
1. Update `TargetFramework` in `AutoBidder.csproj` from `net8.0` to `net10.0`
2. Update all NuGet package references to their target versions
3. Restore dependencies
4. Build the solution and fix all compilation errors
5. Verify solution builds with 0 errors
No parallel vs sequential decision is needed — there is only one project.
## 3. Detailed Dependency Analysis
### Dependency Graph
The solution contains a single project with no inter-project dependencies.
```
Level 0 (Foundation):
??? AutoBidder.csproj (AspNetCore, Blazor)
??? Microsoft.AspNetCore.Identity.EntityFrameworkCore 8.0.0
??? Microsoft.EntityFrameworkCore.Sqlite 8.0.0
??? Npgsql.EntityFrameworkCore.PostgreSQL 8.0.0
```
### Project Groupings
Since there is only 1 project with 0 dependencies, all work is performed in a **single atomic operation** with no phasing required.
| Phase | Projects | Description |
|---|---|---|
| Phase 1: Atomic Upgrade | AutoBidder.csproj | Framework + packages upgrade, build, fix errors |
### Critical Path
There is no critical path — the single project is both leaf and root. The entire upgrade is a single step.
### Circular Dependencies
None detected.
## 4. Project-by-Project Plans
### 4.1 AutoBidder.csproj
#### Current State
| Attribute | Value |
|---|---|
| Target Framework | `net8.0` |
| Project Kind | AspNetCore (Blazor) |
| SDK-style | Yes |
| Lines of Code | 14,361 |
| Code Files | 50 (76 total files) |
| NuGet Packages | 3 |
| Project Dependencies | 0 |
| Dependants | 0 |
| Risk Level | ?? Low |
#### Target State
| Attribute | Value |
|---|---|
| Target Framework | `net10.0` |
| Updated Packages | 2 of 3 |
#### Migration Steps
**1. Prerequisites**
- .NET 10 SDK installed ?
- No `global.json` to update ?
**2. Framework Update**
- Update `TargetFramework` property in `AutoBidder.csproj` from `net8.0` to `net10.0`
**3. Package Updates**
| Package | Current Version | Target Version | Reason |
|---|---|---|---|
| Microsoft.AspNetCore.Identity.EntityFrameworkCore | 8.0.0 | 10.0.5 | Upgrade recommended for .NET 10 compatibility |
| Microsoft.EntityFrameworkCore.Sqlite | 8.0.0 | 10.0.5 | Upgrade recommended for .NET 10 compatibility |
| Npgsql.EntityFrameworkCore.PostgreSQL | 8.0.0 | (keep) | ? Compatible — verify at build time with EF Core 10.0.5 |
**4. Expected Breaking Changes**
- No API incompatibilities detected by assessment
- Potential behavioral changes from EF Core 8 ? 10 (see §6 Breaking Changes Catalog)
- Potential ASP.NET Core / Blazor configuration or middleware changes
**5. Code Modifications**
- No code modifications identified by the assessment (0 estimated LOC impact)
- Compilation errors (if any) will be discovered and fixed during the build step
**6. Validation Checklist**
- [ ] `AutoBidder.csproj` targets `net10.0`
- [ ] All package references updated to target versions
- [ ] Solution restores without dependency conflicts
- [ ] Solution builds with 0 errors
- [ ] No security vulnerabilities
## 5. Package Update Reference
### Common Package Updates (affecting AutoBidder.csproj)
| Package | Current | Target | Update Reason |
|---|---|---|---|
| Microsoft.AspNetCore.Identity.EntityFrameworkCore | 8.0.0 | 10.0.5 | Framework compatibility — align with .NET 10 |
| Microsoft.EntityFrameworkCore.Sqlite | 8.0.0 | 10.0.5 | Framework compatibility — align with .NET 10 |
### Compatible Packages (no update required)
| Package | Current Version | Status |
|---|---|---|
| Npgsql.EntityFrameworkCore.PostgreSQL | 8.0.0 | ? Compatible — verify at build time that it works with EF Core 10.0.5 |
### Notes
- All EF Core-related packages should align to the same major version where possible
- `Npgsql.EntityFrameworkCore.PostgreSQL` 8.0.0 is marked compatible by the assessment; however, if build errors occur related to EF Core version mismatch, investigate whether a newer Npgsql version is required
## 6. Breaking Changes Catalog
The assessment detected **0 API incompatibilities**. However, the following areas should be monitored during the build and test phases:
### Framework Breaking Changes (.NET 8 ? .NET 10)
| Area | Risk | Description |
|---|---|---|
| ASP.NET Core / Blazor | Low | Possible middleware, routing, or configuration changes between .NET 8 and .NET 10 |
| Entity Framework Core 8 ? 10 | Low | Possible behavioral changes in query translation, migrations, or model building |
| Base Class Library (BCL) | Low | Minor API behavioral changes possible |
### Package-Specific Considerations
| Package | Consideration |
|---|---|
| Npgsql.EntityFrameworkCore.PostgreSQL 8.0.0 | Verify compatibility with EF Core 10.0.5 — if incompatible, investigate newer Npgsql version |
| Microsoft.AspNetCore.Identity.EntityFrameworkCore 10.0.5 | Identity API changes possible between major versions |
### Discovery Approach
Since no specific breaking changes were identified, the primary discovery mechanism is:
1. Build the solution after all updates
2. Analyze compilation errors
3. Fix identified issues referencing .NET 10 migration documentation
## 7. Risk Management
### Risk Assessment
| Project | Risk Level | Description | Mitigation |
|---|---|---|---|
| AutoBidder.csproj | ?? Low | Single project, 0 API issues, 2 straightforward package updates | Standard upgrade process; rollback via Git if needed |
### Specific Risks
| Risk | Probability | Impact | Mitigation |
|---|---|---|---|
| Npgsql EF Core compatibility | Low | Medium | If build fails due to EF Core version mismatch, upgrade Npgsql to a .NET 10-compatible version |
| Undiscovered breaking changes in Blazor/ASP.NET Core | Low | Low | Fix compilation errors during build step; consult .NET 10 migration guide |
| EF Core migration compatibility | Low | Medium | Verify existing database migrations still apply correctly with EF Core 10 |
### Contingency Plans
- **Build failures from Npgsql**: Search for a newer version of `Npgsql.EntityFrameworkCore.PostgreSQL` compatible with EF Core 10. If none exists, evaluate alternative PostgreSQL providers.
- **Unexpected compilation errors**: Use .NET 10 breaking changes documentation to resolve. The upgrade branch isolates all changes — the `docker` branch remains untouched.
- **Rollback**: Discard the `upgrade-to-NET10` branch and return to `docker` branch.
## 8. Testing & Validation Strategy
### Build Validation
After the atomic upgrade:
- [ ] `dotnet restore` completes without dependency conflicts
- [ ] `dotnet build` completes with 0 errors
- [ ] No new warnings related to deprecated APIs
### Test Execution
No dedicated test projects were identified in the solution. Validation relies on:
1. Successful build with 0 errors
2. No dependency conflicts
3. No security vulnerabilities
> ?? **Recommendation**: If there are test projects not captured in the solution file, or integration/manual tests, execute them after the upgrade to verify runtime behavior — particularly around Entity Framework Core database operations and Blazor component rendering.
## 9. Complexity & Effort Assessment
### Per-Project Complexity
| Project | Complexity | Dependencies | Package Updates | Risk | Notes |
|---|---|---|---|---|---|
| AutoBidder.csproj | ?? Low | 0 projects | 2 packages | Low | Single project, no API issues, straightforward upgrade |
### Overall Assessment
| Factor | Rating |
|---|---|
| Solution Complexity | Low (1 project, 0 dependencies) |
| Package Update Complexity | Low (2 packages with known target versions) |
| Breaking Change Risk | Low (0 API incompatibilities detected) |
| Testing Complexity | Low (build verification only — no test projects) |
| Overall Upgrade Complexity | **Low** |
## 10. Source Control Strategy
### Branching
| Parameter | Value |
|---|---|
| Source branch | `docker` |
| Upgrade branch | `upgrade-to-NET10` |
| Strategy | Single branch for all upgrade changes |
### Commit Approach
**Single commit** for the entire atomic upgrade operation:
- Framework update, package updates, compilation fixes — all in one commit
- Commit message: `Upgrade to .NET 10.0 — update framework and packages`
### Merge Process
1. Verify solution builds with 0 errors on `upgrade-to-NET10`
2. Merge `upgrade-to-NET10` into `docker` (or open a Pull Request for review)
3. Delete `upgrade-to-NET10` branch after successful merge
## 11. Success Criteria
### Technical Criteria
- [ ] `AutoBidder.csproj` targets `net10.0`
- [ ] `Microsoft.AspNetCore.Identity.EntityFrameworkCore` updated to 10.0.5
- [ ] `Microsoft.EntityFrameworkCore.Sqlite` updated to 10.0.5
- [ ] `Npgsql.EntityFrameworkCore.PostgreSQL` compatible (build succeeds)
- [ ] Solution builds with 0 errors
- [ ] No package dependency conflicts
- [ ] No security vulnerabilities
### Quality Criteria
- [ ] Code quality maintained (no degraded patterns)
- [ ] No new compiler warnings from deprecated APIs
### Process Criteria
- [ ] All-At-Once strategy followed (single atomic operation)
- [ ] All changes on `upgrade-to-NET10` branch
- [ ] Single commit for entire upgrade