Upgrade BettingPredictor from .NET Framework 4.8.1 to .NET 10.0

This commit is contained in:
2026-03-31 21:54:33 +02:00
parent 197988eddb
commit cfb29cc264
24 changed files with 211 additions and 424 deletions
+96
View File
@@ -0,0 +1,96 @@
## [2026-03-31 21:08] TASK-001: Verify Prerequisites
Status: Complete
- **Verified**:
- .NET 10.0 SDK is installed and compatible
- No global.json found, no conflicts to resolve
### Outcome
Success - All prerequisites verified. Environment ready for .NET 10.0 upgrade.
## [2026-03-31 21:16] TASK-002: Convert Project to SDK-style
Status: Complete
- **Files Modified**: HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj
- **Code Changes**: Converted from classic WPF project to SDK-style format using conversion tool. Removed 8 malformed duplicate PackageReference entries (RestSharp.112.1.1-alpha, System.CodeDom.10.0.0-rc, etc.) that were created by the conversion tool alongside the correct entries.
- **Verified**:
- Project uses `<Project Sdk="Microsoft.NET.Sdk">` format
- `<UseWPF>true</UseWPF>` is present
- `<UseWindowsForms>true</UseWindowsForms>` is present
- All source files properly included via globbing
- Malformed duplicate package entries cleaned up
### Outcome
Success - Project successfully converted to SDK-style format with cleanup.
## [2026-03-31 21:21] TASK-003: Update Target Framework and Project Configuration
Status: Complete
- **Files Modified**: HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj
- **Code Changes**: Changed TargetFramework from net481 to net10.0-windows. Removed unnecessary ImportWindowsDesktopTargets property.
- **Verified**:
- TargetFramework is net10.0-windows
- UseWPF is true
- UseWindowsForms is true
- ImportWindowsDesktopTargets removed (redundant with -windows TFM)
### Outcome
Success - Target framework updated to net10.0-windows.
## [2026-03-31 21:30] TASK-004: Update NuGet Package References
Status: Complete
- **Files Modified**: HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj
- **Code Changes**:
- Removed legacy assembly References (System.Web, System.Data.DataSetExtensions, Microsoft.CSharp, System.Net.Http)
- Updated Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.Numerics to 10.0.5
- Updated System.Numerics.Tensors to 10.0.5
- Removed 13 framework-included packages: Microsoft.CSharp, System.Buffers, System.CodeDom, System.Collections.Immutable, System.IO.Pipelines, System.Memory, System.Numerics.Vectors, System.Reflection.Emit.Lightweight, System.Runtime.CompilerServices.Unsafe, System.Text.Encodings.Web, System.Text.Json, System.Threading.Channels, System.Threading.Tasks.Extensions, System.ValueTuple
- Added Microsoft.Data.SqlClient 7.0.0
- Added System.Configuration.ConfigurationManager 10.0.5
- **Verified**: dotnet restore completed with 0 errors and only 1 informational warning (NU1510)
### Outcome
Success - All NuGet packages updated, removed, or added per plan. Restore clean.
## [2026-03-31 21:38] TASK-005: Migrate SqlClient Namespace
Status: Complete
- **Files Modified**:
- Football/Database/APIResponse.cs, BetType.cs, Bookmaker.cs, Comparison.cs, Fixture.cs, FixtureLeague.cs, Goals.cs, H2H.cs, League.cs, LeagueStats.cs, Odds.cs, Prediction.cs, Score.cs, Team.cs, TeamStats.cs
- Football/Manager/Database.cs
- Manager/Database.cs
- HorseRacing/Main.cs
- (Additional file: HorseRacing/Manager/Database.cs if present)
- **Code Changes**: Replaced all `System.Data.SqlClient` references with `Microsoft.Data.SqlClient` across 19 files (including using directives and fully-qualified references in Fixture.cs)
- **Errors Fixed**: APIResponse.cs was accidentally emptied due to file lock during bulk replace; recovered from git and manually patched
- **Verified**:
- Zero remaining `System.Data.SqlClient` references
- All files confirmed using `Microsoft.Data.SqlClient`
### Outcome
Success - SqlClient namespace migration complete across all 19 affected files.
## [2026-03-31 21:46] TASK-006: Build Solution and Fix Compilation Errors
Status: Complete
- **Files Deleted**: HorseRacingPredictor/HorseRacingPredictor/CsvHelperStubs.cs
- **Code Changes**: Removed CsvHelperStubs.cs which contained placeholder type definitions conflicting with actual CsvHelper 33.1.0 package types (IReaderRow, MemberMapData, DefaultTypeConverter, CsvReader, etc.)
- **Errors Fixed**: 4 CS0104 ambiguous reference errors in Manager/FileReader.cs (IReaderRow, MemberMapData) resolved by removing conflicting stub file
- **Build Status**: Successful — 0 errors, 1 warning (NU1510 informational)
### Outcome
Success - Solution builds with 0 errors on .NET 10.0.
+26 -26
View File
@@ -4,10 +4,10 @@
| Status | Count |
|---|---|
| ? Complete | 0 |
| ? Complete | 1 |
| ? In Progress | 0 |
| ? Not Started | 7 |
| ? Failed | 0 |
| ? Not Started | 6 |
**Progress**: 6/7 tasks complete (86%) ![86%](https://progress-bar.xyz/86)
| ? Skipped | 0 |
| **Total** | **7** |
@@ -15,61 +15,61 @@
## Tasks
### [?] TASK-001: Verify Prerequisites
### [?] TASK-001: Verify Prerequisites *(Completed: 2026-03-31 21:10)*
**Scope**: Environment readiness
**References**: Plan §2.2
**Actions:**
- [?] (1) Verify .NET 10.0 SDK is installed on the machine (`dotnet --list-sdks`)
- [ ] (2) Validate global.json compatibility if present, ensure it allows .NET 10.0 SDK; update or remove if needed
- [?] (2) Validate global.json compatibility ? if present, ensure it allows .NET 10.0 SDK; update or remove if needed
---
### [ ] TASK-002: Convert Project to SDK-style
### [?] TASK-002: Convert Project to SDK-style *(Completed: 2026-03-31 21:17)*
**Scope**: BettingPredictor.csproj
**References**: Plan §4.1 Step 1
**Actions:**
- [ ] (1) Convert `HorseRacingPredictor\HorseRacingPredictor\BettingPredictor.csproj` to SDK-style format using the SDK-style conversion tool
- [ ] (2) Verify the converted .csproj uses `Microsoft.NET.Sdk` format and all source files are properly included
- [?] (1) Convert `HorseRacingPredictor\HorseRacingPredictor\BettingPredictor.csproj` to SDK-style format using the SDK-style conversion tool
- [?] (2) Verify the converted .csproj uses `Microsoft.NET.Sdk` format and all source files are properly included
---
### [ ] TASK-003: Update Target Framework and Project Configuration
### [?] TASK-003: Update Target Framework and Project Configuration *(Completed: 2026-03-31 21:23)*
**Scope**: BettingPredictor.csproj
**References**: Plan §4.1 Step 2
**Actions:**
- [ ] (1) Set `<TargetFramework>` to `net10.0-windows` in BettingPredictor.csproj
- [ ] (2) Ensure `<UseWPF>true</UseWPF>` is present in the project file (required for WPF support on .NET 10.0)
- [ ] (3) Verify project file structure is correct after TFM change
- [?] (1) Set `<TargetFramework>` to `net10.0-windows` in BettingPredictor.csproj
- [?] (2) Ensure `<UseWPF>true</UseWPF>` is present in the project file (required for WPF support on .NET 10.0)
- [?] (3) Verify project file structure is correct after TFM change
---
### [ ] TASK-004: Update NuGet Package References
### [?] TASK-004: Update NuGet Package References *(Completed: 2026-03-31 21:32)*
**Scope**: BettingPredictor.csproj
**References**: Plan §5.1, §5.2, §5.3
**Actions:**
- [ ] (1) Update 9 pre-release packages to stable 10.0.5:
- [?] (1) Update 9 pre-release packages to stable 10.0.5:
Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.Numerics, System.CodeDom,
System.Collections.Immutable, System.IO.Pipelines, System.Numerics.Tensors,
System.Text.Encodings.Web, System.Text.Json, System.Threading.Channels
- [ ] (2) Remove 6 framework-included packages:
- [?] (2) Remove 6 framework-included packages:
System.Buffers, System.Memory, System.Numerics.Vectors,
System.Reflection.Emit.Lightweight, System.Threading.Tasks.Extensions, System.ValueTuple
- [ ] (3) Add `Microsoft.Data.SqlClient` package (latest stable version)
- [ ] (4) Add `System.Configuration.ConfigurationManager` package (latest stable for net10.0)
- [ ] (5) Run `dotnet restore` and verify all packages resolve without conflicts
- [?] (3) Add `Microsoft.Data.SqlClient` package (latest stable version)
- [?] (4) Add `System.Configuration.ConfigurationManager` package (latest stable for net10.0)
- [?] (5) Run `dotnet restore` and verify all packages resolve without conflicts
---
### [ ] TASK-005: Migrate SqlClient Namespace
### [?] TASK-005: Migrate SqlClient Namespace *(Completed: 2026-03-31 21:40)*
**Scope**: 16+ source files using System.Data.SqlClient
**References**: Plan §6.1, §4.1 Step 5
**Actions:**
- [ ] (1) In all files under `Manager\` and `Football\Database\` and `Football\Manager\`, replace:
- [?] (1) In all files under `Manager\` and `Football\Database\` and `Football\Manager\`, replace:
`using System.Data.SqlClient;` ? `using Microsoft.Data.SqlClient;`
Affected files (16):
- Manager\Database.cs
@@ -88,22 +88,22 @@
- Football\Database\Goals.cs
- Football\Database\BetType.cs
- Football\Database\Bookmaker.cs
- [ ] (2) Verify no remaining references to `System.Data.SqlClient` exist in the codebase
- [?] (2) Verify no remaining references to `System.Data.SqlClient` exist in the codebase
---
### [ ] TASK-006: Build Solution and Fix Compilation Errors
### [?] TASK-006: Build Solution and Fix Compilation Errors *(Completed: 2026-03-31 21:48)*
**Scope**: Entire solution
**References**: Plan §4.1 Step 7
**Actions:**
- [ ] (1) Build the entire solution
- [ ] (2) Fix any compilation errors discovered during build (expected areas: SqlClient namespace, removed APIs, configuration, WPF assembly references)
- [ ] (3) Rebuild and verify: **0 compilation errors**
- [?] (1) Build the entire solution
- [?] (2) Fix any compilation errors discovered during build (expected areas: SqlClient namespace, removed APIs, configuration, WPF assembly references)
- [?] (3) Rebuild and verify: **0 compilation errors**
---
### [ ] TASK-007: Final Verification and Commit
### [?] TASK-007: Final Verification and Commit
**Scope**: Entire solution
**References**: Plan §10, §11