This commit is contained in:
2026-01-13 23:21:23 -06:00
parent 334c2fecb5
commit 8c65125b16
8 changed files with 27 additions and 1685 deletions

View File

@@ -1,2 +0,0 @@
Issue ID,Description,State,Severity,Story Points,Project Path,Location Kind,Path,Line,Column,Incident ID,Help Link,Assembly Name,Assembly Version,Assembly Public Key,Snippet
Project.0002,Project's target framework(s) needs to be changed,Active,Mandatory,1,Shogi.Database\Shogi.Database.sqlproj,File,Shogi.Database\Shogi.Database.sqlproj,,,,,,,,"Current target framework: .NETFramework,Version=v4.7.2 Recommended target framework: net10.0"
1 Issue ID Description State Severity Story Points Project Path Location Kind Path Line Column Incident ID Help Link Assembly Name Assembly Version Assembly Public Key Snippet
2 Project.0002 Project's target framework(s) needs to be changed Active Mandatory 1 Shogi.Database\Shogi.Database.sqlproj File Shogi.Database\Shogi.Database.sqlproj Current target framework: .NETFramework,Version=v4.7.2 Recommended target framework: net10.0

View File

@@ -1,222 +0,0 @@
{
"settings": {
"components": {
"code": true,
"binaries": false
},
"targetId": "net10.0",
"targetDisplayName": ".NETCoreApp,Version=v10.0"
},
"analysisStartTime": "2026-01-14T03:11:27.1112869Z",
"analysisEndTime": "2026-01-14T03:11:27.3394814Z",
"privacyModeHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2270980",
"stats": {
"summary": {
"projects": 5,
"issues": 1,
"incidents": 1,
"effort": 1
},
"charts": {
"severity": {
"Mandatory": 1,
"Optional": 0,
"Potential": 0,
"Information": 0
},
"category": {
"Project": 1
}
}
},
"projects": [
{
"path": "BoardRules\\BoardRules.csproj",
"startingProject": true,
"issues": 0,
"storyPoints": 0,
"properties": {
"appName": "BoardRules",
"projectKind": "ClassLibrary",
"frameworks": [
"net10.0"
],
"languages": [
"C#"
],
"tools": [
"MSBuild"
],
"isSdkStyle": true,
"numberOfFiles": 1,
"numberOfCodeFiles": 1,
"linesTotal": 120,
"linesOfCode": 120,
"totalApiScanned": 0,
"minLinesOfCodeToChange": 0,
"maxLinesOfCodeToChange": 0
},
"ruleInstances": [],
"features": []
},
{
"path": "Tests\\AcceptanceTests\\Shogi.AcceptanceTests.csproj",
"startingProject": true,
"issues": 0,
"storyPoints": 0,
"properties": {
"appName": "Shogi.AcceptanceTests",
"projectKind": "DotNetCoreApp",
"frameworks": [
"net10.0"
],
"languages": [
"C#"
],
"tools": [
"MSBuild"
],
"isSdkStyle": true,
"numberOfFiles": 5,
"numberOfCodeFiles": 3,
"linesTotal": 3059,
"linesOfCode": 443,
"totalApiScanned": 0,
"minLinesOfCodeToChange": 0,
"maxLinesOfCodeToChange": 0
},
"ruleInstances": [],
"features": []
},
{
"path": "Shogi\\Shogi.csproj",
"startingProject": true,
"issues": 0,
"storyPoints": 0,
"properties": {
"appName": "Shogi",
"projectKind": "AspNetCore",
"frameworks": [
"net10.0"
],
"languages": [
"C#"
],
"tools": [
"MSBuild"
],
"isSdkStyle": true,
"numberOfFiles": 118,
"numberOfCodeFiles": 55,
"linesTotal": 10759,
"linesOfCode": 4232,
"totalApiScanned": 0,
"minLinesOfCodeToChange": 0,
"maxLinesOfCodeToChange": 0
},
"ruleInstances": [],
"features": []
},
{
"path": "Shogi.Database\\Shogi.Database.sqlproj",
"startingProject": true,
"issues": 1,
"storyPoints": 1,
"properties": {
"appName": "Shogi.Database",
"projectKind": "ClassicClassLibrary",
"frameworks": [
"net472"
],
"languages": [
""
],
"tools": [
"MSBuild"
],
"isSdkStyle": false,
"numberOfFiles": 0,
"numberOfCodeFiles": 0,
"linesTotal": 0,
"linesOfCode": 0,
"totalApiScanned": 0,
"minLinesOfCodeToChange": 0,
"maxLinesOfCodeToChange": 0
},
"ruleInstances": [
{
"incidentId": "a43e59f8-9932-42d1-991f-9653db2e0408",
"ruleId": "Project.0002",
"projectPath": "Shogi.Database\\Shogi.Database.sqlproj",
"state": "Active",
"location": {
"snippetModel": {
"unrestricted": "Current target framework: .NETFramework,Version=v4.7.2\nRecommended target framework: net10.0",
"protected": "Current target framework: .NETFramework,Version=v4.7.2\nRecommended target framework: net10.0"
},
"kind": "File",
"path": "Shogi.Database\\Shogi.Database.sqlproj",
"snippet": "Current target framework: .NETFramework,Version=v4.7.2\nRecommended target framework: net10.0",
"protectedSnippet": "Current target framework: .NETFramework,Version=v4.7.2\nRecommended target framework: net10.0",
"properties": {
"CurrentTargetFramework": ".NETFramework,Version=v4.7.2",
"RecommendedTargetFramework": "net10.0"
}
}
}
],
"features": []
},
{
"path": "Tests\\UnitTests\\UnitTests.csproj",
"startingProject": true,
"issues": 0,
"storyPoints": 0,
"properties": {
"appName": "UnitTests",
"projectKind": "DotNetCoreApp",
"frameworks": [
"net10.0"
],
"languages": [
"C#"
],
"tools": [
"MSBuild"
],
"isSdkStyle": true,
"numberOfFiles": 7,
"numberOfCodeFiles": 5,
"linesTotal": 3574,
"linesOfCode": 958,
"totalApiScanned": 0,
"minLinesOfCodeToChange": 0,
"maxLinesOfCodeToChange": 0
},
"ruleInstances": [],
"features": []
}
],
"rules": {
"Project.0002": {
"id": "Project.0002",
"isFeature": false,
"description": "Project\u0027s target framework(s) needs to be changed to the new target framework that you selected for this upgrade.\n\nDuring upgrade target framework will be adjusted to corresponding platform when applicable. In some cases project would result in multiple target frameworks after the upgrade if it was using features that now have their own platforms in modern .NET frameworks (windows, iOS, Android etc).",
"label": "Project\u0027s target framework(s) needs to be changed",
"severity": "Mandatory",
"effort": 1,
"links": [
{
"title": "Overview of porting from .NET Framework to .NET",
"url": "https://go.microsoft.com/fwlink/?linkid=2265227",
"isCustom": false
},
{
"title": ".NET project SDKs",
"url": "https://go.microsoft.com/fwlink/?linkid=2265226",
"isCustom": false
}
]
}
}
}

View File

@@ -1,339 +0,0 @@
# Projects and dependencies analysis
This document provides a comprehensive overview of the projects and their dependencies in the context of upgrading to .NETCoreApp,Version=v10.0.
## Table of Contents
- [Executive Summary](#executive-Summary)
- [Highlevel Metrics](#highlevel-metrics)
- [Projects Compatibility](#projects-compatibility)
- [Package Compatibility](#package-compatibility)
- [API Compatibility](#api-compatibility)
- [Aggregate NuGet packages details](#aggregate-nuget-packages-details)
- [Top API Migration Challenges](#top-api-migration-challenges)
- [Technologies and Features](#technologies-and-features)
- [Most Frequent API Issues](#most-frequent-api-issues)
- [Projects Relationship Graph](#projects-relationship-graph)
- [Project Details](#project-details)
- [BoardRules\BoardRules.csproj](#boardrulesboardrulescsproj)
- [Shogi.Database\Shogi.Database.sqlproj](#shogidatabaseshogidatabasesqlproj)
- [Shogi\Shogi.csproj](#shogishogicsproj)
- [Tests\AcceptanceTests\Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj)
- [Tests\UnitTests\UnitTests.csproj](#testsunittestsunittestscsproj)
## Executive Summary
### Highlevel Metrics
| Metric | Count | Status |
| :--- | :---: | :--- |
| Total Projects | 5 | 1 require upgrade |
| Total NuGet Packages | 14 | All compatible |
| Total Code Files | 64 | |
| Total Code Files with Incidents | 1 | |
| Total Lines of Code | 5753 | |
| Total Number of Issues | 1 | |
| Estimated LOC to modify | 0+ | at least 0.0% of codebase |
### Projects Compatibility
| Project | Target Framework | Difficulty | Package Issues | API Issues | Est. LOC Impact | Description |
| :--- | :---: | :---: | :---: | :---: | :---: | :--- |
| [BoardRules\BoardRules.csproj](#boardrulesboardrulescsproj) | net10.0 | ✅ None | 0 | 0 | | ClassLibrary, Sdk Style = True |
| [Shogi.Database\Shogi.Database.sqlproj](#shogidatabaseshogidatabasesqlproj) | net472 | 🟢 Low | 0 | 0 | | ClassicClassLibrary, Sdk Style = False |
| [Shogi\Shogi.csproj](#shogishogicsproj) | net10.0 | ✅ None | 0 | 0 | | AspNetCore, Sdk Style = True |
| [Tests\AcceptanceTests\Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj) | net10.0 | ✅ None | 0 | 0 | | DotNetCoreApp, Sdk Style = True |
| [Tests\UnitTests\UnitTests.csproj](#testsunittestsunittestscsproj) | net10.0 | ✅ None | 0 | 0 | | DotNetCoreApp, Sdk Style = True |
### Package Compatibility
| Status | Count | Percentage |
| :--- | :---: | :---: |
| ✅ Compatible | 14 | 100.0% |
| ⚠️ Incompatible | 0 | 0.0% |
| 🔄 Upgrade Recommended | 0 | 0.0% |
| ***Total NuGet Packages*** | ***14*** | ***100%*** |
### API Compatibility
| Category | Count | Impact |
| :--- | :---: | :--- |
| 🔴 Binary Incompatible | 0 | High - Require code changes |
| 🟡 Source Incompatible | 0 | Medium - Needs re-compilation and potential conflicting API error fixing |
| 🔵 Behavioral change | 0 | Low - Behavioral changes that may require testing at runtime |
| ✅ Compatible | 0 | |
| ***Total APIs Analyzed*** | ***0*** | |
## Aggregate NuGet packages details
| Package | Current Version | Suggested Version | Projects | Description |
| :--- | :---: | :---: | :--- | :--- |
| coverlet.collector | 6.0.4 | | [Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj)<br/>[UnitTests.csproj](#testsunittestsunittestscsproj) | ✅Compatible |
| Dapper | 2.1.66 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| FluentValidation | 12.1.1 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| Microsoft.AspNetCore.Identity.EntityFrameworkCore | 10.0.1 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| Microsoft.AspNetCore.Mvc.Testing | 10.0.1 | | [Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj) | ✅Compatible |
| Microsoft.AspNetCore.SignalR.Client | 10.0.1 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| Microsoft.EntityFrameworkCore.Design | 10.0.1 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| Microsoft.EntityFrameworkCore.InMemory | 10.0.1 | | [Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj)<br/>[Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| Microsoft.EntityFrameworkCore.SqlServer | 10.0.1 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| Microsoft.NET.Test.Sdk | 18.0.1 | | [Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj)<br/>[UnitTests.csproj](#testsunittestsunittestscsproj) | ✅Compatible |
| Swashbuckle.AspNetCore | 10.1.0 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| System.Data.SqlClient | 4.9.0 | | [Shogi.csproj](#shogishogicsproj) | ✅Compatible |
| xunit | 2.9.3 | | [Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj)<br/>[UnitTests.csproj](#testsunittestsunittestscsproj) | ✅Compatible |
| xunit.runner.visualstudio | 3.1.5 | | [Shogi.AcceptanceTests.csproj](#testsacceptancetestsshogiacceptancetestscsproj)<br/>[UnitTests.csproj](#testsunittestsunittestscsproj) | ✅Compatible |
## Top API Migration Challenges
### Technologies and Features
| Technology | Issues | Percentage | Migration Path |
| :--- | :---: | :---: | :--- |
### Most Frequent API Issues
| API | Count | Percentage | Category |
| :--- | :---: | :---: | :--- |
## Projects Relationship Graph
Legend:
📦 SDK-style project
⚙️ Classic project
```mermaid
flowchart LR
P1["<b>⚙️&nbsp;Shogi.Database.sqlproj</b><br/><small>net472</small>"]
P2["<b>📦&nbsp;BoardRules.csproj</b><br/><small>net10.0</small>"]
P3["<b>📦&nbsp;Shogi.AcceptanceTests.csproj</b><br/><small>net10.0</small>"]
P4["<b>📦&nbsp;UnitTests.csproj</b><br/><small>net10.0</small>"]
P5["<b>📦&nbsp;Shogi.csproj</b><br/><small>net10.0</small>"]
P3 --> P5
P4 --> P5
click P1 "#shogidatabaseshogidatabasesqlproj"
click P2 "#boardrulesboardrulescsproj"
click P3 "#testsacceptancetestsshogiacceptancetestscsproj"
click P4 "#testsunittestsunittestscsproj"
click P5 "#shogishogicsproj"
```
## Project Details
<a id="boardrulesboardrulescsproj"></a>
### BoardRules\BoardRules.csproj
#### Project Info
- **Current Target Framework:** net10.0✅
- **SDK-style**: True
- **Project Kind:** ClassLibrary
- **Dependencies**: 0
- **Dependants**: 0
- **Number of Files**: 1
- **Lines of Code**: 120
- **Estimated LOC to modify**: 0+ (at least 0.0% of the project)
#### Dependency Graph
Legend:
📦 SDK-style project
⚙️ Classic project
```mermaid
flowchart TB
subgraph current["BoardRules.csproj"]
MAIN["<b>📦&nbsp;BoardRules.csproj</b><br/><small>net10.0</small>"]
click MAIN "#boardrulesboardrulescsproj"
end
```
### API Compatibility
| Category | Count | Impact |
| :--- | :---: | :--- |
| 🔴 Binary Incompatible | 0 | High - Require code changes |
| 🟡 Source Incompatible | 0 | Medium - Needs re-compilation and potential conflicting API error fixing |
| 🔵 Behavioral change | 0 | Low - Behavioral changes that may require testing at runtime |
| ✅ Compatible | 0 | |
| ***Total APIs Analyzed*** | ***0*** | |
<a id="shogidatabaseshogidatabasesqlproj"></a>
### Shogi.Database\Shogi.Database.sqlproj
#### Project Info
- **Current Target Framework:** net472
- **Proposed Target Framework:** net10.0
- **SDK-style**: False
- **Project Kind:** ClassicClassLibrary
- **Dependencies**: 0
- **Dependants**: 0
- **Number of Files**: 0
- **Number of Files with Incidents**: 1
- **Lines of Code**: 0
- **Estimated LOC to modify**: 0+ (at least 0.0% of the project)
#### Dependency Graph
Legend:
📦 SDK-style project
⚙️ Classic project
```mermaid
flowchart TB
subgraph current["Shogi.Database.sqlproj"]
MAIN["<b>⚙️&nbsp;Shogi.Database.sqlproj</b><br/><small>net472</small>"]
click MAIN "#shogidatabaseshogidatabasesqlproj"
end
```
### API Compatibility
| Category | Count | Impact |
| :--- | :---: | :--- |
| 🔴 Binary Incompatible | 0 | High - Require code changes |
| 🟡 Source Incompatible | 0 | Medium - Needs re-compilation and potential conflicting API error fixing |
| 🔵 Behavioral change | 0 | Low - Behavioral changes that may require testing at runtime |
| ✅ Compatible | 0 | |
| ***Total APIs Analyzed*** | ***0*** | |
<a id="shogishogicsproj"></a>
### Shogi\Shogi.csproj
#### Project Info
- **Current Target Framework:** net10.0✅
- **SDK-style**: True
- **Project Kind:** AspNetCore
- **Dependencies**: 0
- **Dependants**: 2
- **Number of Files**: 118
- **Lines of Code**: 4232
- **Estimated LOC to modify**: 0+ (at least 0.0% of the project)
#### Dependency Graph
Legend:
📦 SDK-style project
⚙️ Classic project
```mermaid
flowchart TB
subgraph upstream["Dependants (2)"]
P3["<b>📦&nbsp;Shogi.AcceptanceTests.csproj</b><br/><small>net10.0</small>"]
P4["<b>📦&nbsp;UnitTests.csproj</b><br/><small>net10.0</small>"]
click P3 "#testsacceptancetestsshogiacceptancetestscsproj"
click P4 "#testsunittestsunittestscsproj"
end
subgraph current["Shogi.csproj"]
MAIN["<b>📦&nbsp;Shogi.csproj</b><br/><small>net10.0</small>"]
click MAIN "#shogishogicsproj"
end
P3 --> MAIN
P4 --> MAIN
```
### API Compatibility
| Category | Count | Impact |
| :--- | :---: | :--- |
| 🔴 Binary Incompatible | 0 | High - Require code changes |
| 🟡 Source Incompatible | 0 | Medium - Needs re-compilation and potential conflicting API error fixing |
| 🔵 Behavioral change | 0 | Low - Behavioral changes that may require testing at runtime |
| ✅ Compatible | 0 | |
| ***Total APIs Analyzed*** | ***0*** | |
<a id="testsacceptancetestsshogiacceptancetestscsproj"></a>
### Tests\AcceptanceTests\Shogi.AcceptanceTests.csproj
#### Project Info
- **Current Target Framework:** net10.0✅
- **SDK-style**: True
- **Project Kind:** DotNetCoreApp
- **Dependencies**: 1
- **Dependants**: 0
- **Number of Files**: 5
- **Lines of Code**: 443
- **Estimated LOC to modify**: 0+ (at least 0.0% of the project)
#### Dependency Graph
Legend:
📦 SDK-style project
⚙️ Classic project
```mermaid
flowchart TB
subgraph current["Shogi.AcceptanceTests.csproj"]
MAIN["<b>📦&nbsp;Shogi.AcceptanceTests.csproj</b><br/><small>net10.0</small>"]
click MAIN "#testsacceptancetestsshogiacceptancetestscsproj"
end
subgraph downstream["Dependencies (1"]
P5["<b>📦&nbsp;Shogi.csproj</b><br/><small>net10.0</small>"]
click P5 "#shogishogicsproj"
end
MAIN --> P5
```
### API Compatibility
| Category | Count | Impact |
| :--- | :---: | :--- |
| 🔴 Binary Incompatible | 0 | High - Require code changes |
| 🟡 Source Incompatible | 0 | Medium - Needs re-compilation and potential conflicting API error fixing |
| 🔵 Behavioral change | 0 | Low - Behavioral changes that may require testing at runtime |
| ✅ Compatible | 0 | |
| ***Total APIs Analyzed*** | ***0*** | |
<a id="testsunittestsunittestscsproj"></a>
### Tests\UnitTests\UnitTests.csproj
#### Project Info
- **Current Target Framework:** net10.0✅
- **SDK-style**: True
- **Project Kind:** DotNetCoreApp
- **Dependencies**: 1
- **Dependants**: 0
- **Number of Files**: 7
- **Lines of Code**: 958
- **Estimated LOC to modify**: 0+ (at least 0.0% of the project)
#### Dependency Graph
Legend:
📦 SDK-style project
⚙️ Classic project
```mermaid
flowchart TB
subgraph current["UnitTests.csproj"]
MAIN["<b>📦&nbsp;UnitTests.csproj</b><br/><small>net10.0</small>"]
click MAIN "#testsunittestsunittestscsproj"
end
subgraph downstream["Dependencies (1"]
P5["<b>📦&nbsp;Shogi.csproj</b><br/><small>net10.0</small>"]
click P5 "#shogishogicsproj"
end
MAIN --> P5
```
### API Compatibility
| Category | Count | Impact |
| :--- | :---: | :--- |
| 🔴 Binary Incompatible | 0 | High - Require code changes |
| 🟡 Source Incompatible | 0 | Medium - Needs re-compilation and potential conflicting API error fixing |
| 🔵 Behavioral change | 0 | Low - Behavioral changes that may require testing at runtime |
| ✅ Compatible | 0 | |
| ***Total APIs Analyzed*** | ***0*** | |

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +0,0 @@
{
"scenarioId": "New-DotNet-Version",
"operationId": "a1d9f56b-ad01-4c78-bbfa-17a76f5681a3",
"description": "Upgrade solution or project to new version of .NET",
"startTime": "2026-01-14T02:57:44.7961447Z",
"lastUpdateTime": "2026-01-14T03:37:51.3730402Z",
"stage": "Execution",
"properties": {
"SelectedScenarioStrategy": "AllAtOnce",
"upgradeTargetFramework": "net10.0"
}
}

View File

@@ -1,59 +0,0 @@
# Shogi .NET 10.0 Upgrade Verification Tasks
## Overview
This document tracks the verification of the Shogi solution upgrade to .NET 10.0. All projects are already targeting net10.0, and this verification confirms the upgrade is complete and functional.
**Progress**: 0/4 tasks complete (0%) ![0%](https://progress-bar.xyz/0)
---
## Tasks
### [▶] TASK-001: Verify .NET 10.0 SDK and configuration prerequisites
**References**: Plan §Migration Strategy - Phase 0
- [✓] (1) Verify .NET 10.0 SDK is installed and available
- [✓] (2) .NET 10.0 SDK version meets minimum requirements (**Verify**)
- [▶] (3) Check for global.json file and verify compatibility if present
- [ ] (4) global.json compatible with .NET 10.0 or no global.json present (**Verify**)
---
### [ ] TASK-002: Verify all projects target net10.0 and build solution
**References**: Plan §Migration Strategy - Phase 1, Plan §Migration Strategy - Phase 2, Plan §Project-by-Project Migration Plans, Plan §Package Update Reference
- [ ] (1) Verify TargetFramework is net10.0 in BoardRules\BoardRules.csproj
- [ ] (2) Verify TargetFramework is net10.0 in Shogi\Shogi.csproj
- [ ] (3) Verify TargetFramework is net10.0 in Tests\AcceptanceTests\Shogi.AcceptanceTests.csproj
- [ ] (4) Verify TargetFramework is net10.0 in Tests\UnitTests\UnitTests.csproj
- [ ] (5) Verify TargetFramework is net472 in Shogi.Database\Shogi.Database.sqlproj (SQL database project remains on .NET Framework)
- [ ] (6) All .NET projects correctly targeting net10.0 and SQL project correctly on net472 (**Verify**)
- [ ] (7) Verify all 14 package references are at compatible versions per Plan §Package Update Reference
- [ ] (8) All packages are at .NET 10.0-compatible versions (**Verify**)
- [ ] (9) Restore dependencies for entire solution
- [ ] (10) All dependencies restore successfully (**Verify**)
- [ ] (11) Build entire solution
- [ ] (12) Solution builds with 0 errors and 0 warnings (**Verify**)
---
### [ ] TASK-003: Run full test suite and validate
**References**: Plan §Migration Strategy - Phase 3, Plan §Testing & Validation Strategy
- [ ] (1) Run tests in Tests\AcceptanceTests\Shogi.AcceptanceTests.csproj
- [ ] (2) Fix any acceptance test failures if found
- [ ] (3) Run tests in Tests\UnitTests\UnitTests.csproj
- [ ] (4) Fix any unit test failures if found
- [ ] (5) Re-run all tests after fixes (if any fixes were needed)
- [ ] (6) All tests pass with 0 failures (**Verify**)
---
### [ ] TASK-004: Commit verification results
**References**: Plan §Source Control Strategy
- [ ] (1) Commit all changes with message: "Verify .NET 10.0 upgrade - all projects confirmed on target framework"
---

View File

@@ -1,5 +1,5 @@
using Shogi.AcceptanceTests.TestSetup;
using Shogi.Types;
using Shogi.BackEnd.Types;
using System.Net;
using System.Net.Http.Json;

View File

@@ -1,8 +1,9 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.AspNetCore.TestHost;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Shogi.Identity;
using Shogi.BackEnd.Identity;
using System.Net.Http.Json;
using System.Text.Json;
@@ -24,29 +25,25 @@ public class AatTestFixture : WebApplicationFactory<Program>, IAsyncLifetime
{
builder.UseEnvironment("Development");
builder.ConfigureServices(services =>
builder.ConfigureTestServices(services =>
{
// Remove all EF Core and database provider related services
var descriptorsToRemove = services
.Where(d => d.ServiceType.Namespace != null &&
(d.ServiceType.Namespace.StartsWith("Microsoft.EntityFrameworkCore") ||
d.ServiceType == typeof(ApplicationDbContext) ||
d.ServiceType == typeof(DbContextOptions<ApplicationDbContext>)))
.ToList();
foreach (var descriptor in descriptorsToRemove)
{
// Remove the existing DbContext registration
var descriptor = services.SingleOrDefault(
d => d.ServiceType == typeof(DbContextOptions<ApplicationDbContext>));
services.Remove(descriptor);
}
if (descriptor != null)
{
services.Remove(descriptor);
}
// Add in-memory database for testing
services.AddDbContext<ApplicationDbContext>(options =>
{
options.UseInMemoryDatabase("IntegrationTestDb_" + Guid.NewGuid().ToString());
});
// Ensure the database is created and seeded
var sp = services.BuildServiceProvider();
using var scope = sp.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
db.Database.EnsureCreated();
});
// Add DbContext with InMemory database
services.AddDbContext<ApplicationDbContext>(options =>
options.UseInMemoryDatabase("IntegrationTestDb_" + Guid.NewGuid().ToString()));
});
}
public async Task InitializeAsync()
@@ -54,6 +51,13 @@ public class AatTestFixture : WebApplicationFactory<Program>, IAsyncLifetime
this.HttpClient = this.CreateClient();
this.OtherHttpClient = this.CreateClient();
// Ensure the in-memory database is created
using (var scope = this.Services.CreateScope())
{
var db = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
await db.Database.EnsureCreatedAsync();
}
await this.SetupTestAccountsAndLogin();
}