Align System Drawing with .NET 10
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="10.0.12" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -11,8 +11,9 @@ Last updated: 2026-09-16
|
||||
|
||||
| Component | Scope | Status | Date reviewed | Next steps | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| `BusinessMgr.sln` | .NET 10 restore, Debug build, and tests | Migrated; passing with warnings | 2026-09-16 | Review System.Drawing.Common, perform application smoke tests, then release-validate. | All eight projects target `net10.0`. Razor runtime compilation 10.0.12 and the tested Common database dependencies are aligned with .NET 10. Control tests pass 11 of 11 and Portal tests pass 13 of 13. |
|
||||
| `BusinessMgr.sln` | .NET 10 restore, Debug build, and tests | Migrated; passing with warnings | 2026-09-16 | Perform application smoke tests, then release-validate. | All eight projects target `net10.0`. Razor runtime compilation 10.0.12, System.Drawing.Common 10.0.12, and the tested Common database dependencies are aligned with .NET 10. Control tests pass 11 of 11 and Portal tests pass 13 of 13. |
|
||||
| `SaBusMgrCoreWeb` and web applications | Razor runtime compilation | Dependency aligned with .NET 10 | 2026-09-16 | Retain the package-owner audits and cover runtime view compilation in application smoke testing. | Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 10.0.12 is referenced by the shared web project and both applications. The solution build and both test suites pass, and all three package audits report no known vulnerabilities. |
|
||||
| `SaBusMgrCoreProcs/Procs/Reports` | System.Drawing.Common and legacy report printing | Dependency aligned; Windows-only architecture review deferred | 2026-09-16 | Revisit only when report printing is required or cross-platform report output is planned. | System.Drawing.Common 10.0.12 builds and audits cleanly. The Windows-only subsystem uses `Graphics`, printing, fonts, brushes, text measurement, and footer rendering, but the abstract `SbmReport` currently has no implementations or call sites. Future options remain isolation/removal, a dedicated Windows-targeted project with rendering tests, or replacement with SkiaSharp-based image/PDF reporting. |
|
||||
| `SaBusMgrStandardBase/Base/Helpers/SbmPasswordHelper.cs` and `SaBusinessMgrCoreWebControl/Control/Helpers/SbmcPasswordHelper.cs` | Password hashing | Dependency upgrade complete; legacy hashes compatible | 2026-09-13 | Preserve the compatibility tests when password-hashing defaults or account migration behavior changes. | Both helpers use `PasswordHasher<TUser>` from `Microsoft.Extensions.Identity.Core` 10.0.12. Current hashes round-trip, wrong passwords fail, and legacy Identity V3 hashes remain valid while being identified for rehash. |
|
||||
| `eng/validate.ps1` | Repository validation | Complete; passing | 2026-09-16 | Use as the standard validation entry point and extend it when repository-wide checks change. | Restores and builds serially with the .NET CLI, runs 11 Control and 13 Portal NUnit tests, audits the Identity and three web package owners, and verifies changed-file line endings and diffs. |
|
||||
| `eng/validate.ps1` | Repository validation | Complete; passing | 2026-09-16 | Use as the standard validation entry point and extend it when repository-wide checks change. | Restores and builds serially with the .NET CLI, runs 11 Control and 13 Portal NUnit tests, audits the Identity, process, and three web package owners, and verifies changed-file line endings and diffs. |
|
||||
| `SaBusMgrTest_Control` and `SaBusMgrTest_Portal` | Test framework, SDK, and coverage tooling | Migrated to NUnit; coverage verified | 2026-09-15 | Use NUnit constraint assertions with `Assert.That` wherever possible. | Both projects use Microsoft.NET.Test.Sdk 18.10.0, NUnit 4.6.1, NUnit3TestAdapter 6.3.0, NUnit.Analyzers 4.15.0, and coverlet collector 10.0.1. All tests use NUnit's constraint assertion model; Control passes 11 tests and Portal passes 13 tests. The Control base fixture constructs valid session data from the configured test account, avoiding a null session in console tests. The optional validation coverage mode verifies a non-empty Cobertura report from each suite without an SSDT-specific publish step. |
|
||||
|
||||
+2
-1
@@ -13,7 +13,7 @@ Last updated: 2026-09-16
|
||||
|
||||
| Priority | Topic | Date noted | Next step | Notes |
|
||||
|---|---|---|---|---|
|
||||
| P2 | Review System.Drawing.Common after .NET 10 retargeting | 2026-09-10 | Inventory the drawing APIs and runtime platforms, then decide whether to update the Windows-only package or replace its usage before release validation. | Identity, ODBC, SqlClient, and Razor runtime compilation are aligned with .NET 10. System.Drawing.Common remains on 6.0.0 and needs a separate compatibility review rather than a blind update. |
|
||||
| P3 deferred | Review legacy report rendering and printing | 2026-09-10 | Revisit only when report printing is required or cross-platform output is planned. | System.Drawing.Common is aligned at 10.0.12, but `SbmReport` remains Windows-only and currently has no implementations or external call sites. Later options are to isolate inactive source and remove the package; isolate active printing in a Windows-targeted project with rendering tests; or redesign reporting around SkiaSharp and generated image/PDF output. ImageSharp is not a direct replacement for printer integration. |
|
||||
|
||||
## .NET 10 Dependencies and Sequence
|
||||
|
||||
@@ -34,6 +34,7 @@ Last updated: 2026-09-16
|
||||
|
||||
| Topic | Date noted | Date started | Date completed | Outcome |
|
||||
|---|---|---|---|---|
|
||||
| Align System.Drawing.Common with .NET 10 | 2026-09-16 | 2026-09-16 | 2026-09-16 | Updated System.Drawing.Common from 6.0.0 to 10.0.12 in `SaBusMgrCoreProcs`. The complete solution builds, Control passes 11 tests, Portal passes 13 tests, and the package audit reports no known vulnerabilities. Further architectural concern about the dormant Windows-only report code is deferred. |
|
||||
| Align Razor runtime compilation with .NET 10 | 2026-09-16 | 2026-09-16 | 2026-09-16 | Updated Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 6.0.36 to 10.0.12 in the shared web project and both web applications. The complete solution builds; Control passes 11 tests and Portal passes 13 tests. Automated validation now audits all three web package owners, and all report no known vulnerable packages. |
|
||||
| Validate the Common Microsoft.Data.SqlClient 7 upgrade | 2026-09-15 | 2026-09-15 | 2026-09-15 | Common now supplies Microsoft.Data.SqlClient 7.0.3 transitively. BusinessMgr builds successfully and both NUnit suites pass without requiring consumer source or package changes. |
|
||||
| Consume Common's .NET 10 ODBC dependency | 2026-09-15 | 2026-09-15 | 2026-09-15 | Removed six redundant direct System.Data.Odbc 6.0.2 references. BusinessMgr consumes System.Data.Odbc 10.0.12 transitively through the Common database project where the implementation and eight focused provider tests reside. The solution builds with zero errors; Control passes 11 tests and Portal passes 13 tests. |
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ Run the complete BusinessMgr validation:
|
||||
|
||||
Use `-SkipRestore` when packages are already restored. Use `-CollectCoverage` after changing the test platform or coverage collector; it runs additional coverage passes and verifies that both suites produce non-empty Cobertura reports.
|
||||
|
||||
The script suppresses .NET first-run setup and banners, restores and builds serially with the .NET CLI, runs both NUnit projects, audits the Identity- and web-package-owning projects for vulnerable packages, stores test and optional coverage output under the ignored `TestResults/Validation` folder, checks the Git diff, and verifies working-tree line endings without modifying files. Its isolated `DOTNET_CLI_HOME` stores only CLI state; NuGet packages reuse `NUGET_PACKAGES` when already configured or the user's standard `.nuget/packages` cache.
|
||||
The script suppresses .NET first-run setup and banners, restores and builds serially with the .NET CLI, runs both NUnit projects, audits the Identity-, process-, and web-package-owning projects for vulnerable packages, stores test and optional coverage output under the ignored `TestResults/Validation` folder, checks the Git diff, and verifies working-tree line endings without modifying files. Its isolated `DOTNET_CLI_HOME` stores only CLI state; NuGet packages reuse `NUGET_PACKAGES` when already configured or the user's standard `.nuget/packages` cache.
|
||||
|
||||
@@ -116,6 +116,7 @@ try
|
||||
Test-CoverageReport $portalCoveragePath
|
||||
}
|
||||
Invoke-External dotnet @('list', 'SaBusMgrStandardBase\SaBusMgrStandardBase.csproj', 'package', '--vulnerable', '--include-transitive')
|
||||
Invoke-External dotnet @('list', 'SaBusMgrCoreProcs\SaBusMgrCoreProcs.csproj', 'package', '--vulnerable', '--include-transitive')
|
||||
Invoke-External dotnet @('list', 'SaBusMgrCoreWeb\SaBusMgrCoreWeb.csproj', 'package', '--vulnerable', '--include-transitive')
|
||||
Invoke-External dotnet @('list', 'SaBusinessMgrCoreWebControl\SaBusinessMgrCoreWebControl.csproj', 'package', '--vulnerable', '--include-transitive')
|
||||
Invoke-External dotnet @('list', 'SaBusinessMgrCoreWebPortal\SaBusinessMgrCoreWebPortal.csproj', 'package', '--vulnerable', '--include-transitive')
|
||||
|
||||
Reference in New Issue
Block a user