fix: restore net472 compatibility in ModulePipelineRunner#71
fix: restore net472 compatibility in ModulePipelineRunner#71PrzemyslawKlys merged 1 commit intomainfrom
Conversation
PR Review: fix: restore net472 compatibility in ModulePipelineRunnerSummaryThis PR fixes two .NET Framework 4.7.2 compatibility issues in Code Quality ✅Overall Assessment: Good Both changes follow clean coding practices:
Potential Issues
|
There was a problem hiding this comment.
Pull request overview
Restores .NET Framework 4.7.2 (net472) build compatibility for ModulePipelineRunner by avoiding nullable flow-analysis pitfalls in older reference assemblies and removing usage of APIs not available on net472.
Changes:
- Reworked
NormalizeDraftValueto use explicit null + trim handling (avoids CS8602 under net472 nullable annotations). - Replaced
string.IndexOf(char, StringComparison)withstring.IndexOf(string, StringComparison)to match net472 available overloads.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary\n- fix nullable-flow-safe normalization in NormalizeDraftValue to avoid CS8602 on
et472\n- replace string.IndexOf(char, StringComparison) with string.IndexOf(string, StringComparison) for
et472 API compatibility\n\n## Why\nBuilding PSPublishModule failed for
et472 with:\n- CS8602: Dereference of a possibly null reference\n- CS1503: cannot convert from 'System.StringComparison' to 'int'\n\n## Validation\n- dotnet publish PowerForge/PowerForge.csproj -c Release -f net472\n- dotnet build PSPublishModule.sln -c Release\n- dotnet test PowerForge.Tests/PowerForge.Tests.csproj --filter ModulePipeline --nologo\n\nAll commands passed locally.