net48 port (test branch): retarget all projects to .NET Framework 4.8
Retargets RioJoy.Core/Overlay/Tray + tests from net8.0-windows to net48 so the app can be tested as a framework-dependent build (relies on the in-box .NET Framework 4.8 on Windows 10/11). Builds clean; all 241 tests pass. Polyfills (no behavior change): - PolySharp source generator for init/records/Index/Range/required members. - System.Memory, System.Text.Json, Microsoft.Bcl.HashCode, System.Threading.Channels (tests) NuGet packages. - Compat/Net48Polyfills.cs: GetValueOrDefault, KeyValuePair.Deconstruct, Math.Clamp; tests/TestPolyfills.cs: Task.WaitAsync. Source adjustments for APIs absent on net48: - ArgumentNullException/ArgumentException.ThrowIf* inlined to manual guards. - Convert.ToHexString, Encoding.Latin1, Environment.ProcessPath, ApplicationConfiguration.Initialize, Enum.GetNames<T>/GetValues<T>, string.StartsWith(char), string.Split(char, opts), TextBox.PlaceholderText, PeriodicTimer, Memory-based Stream Read/WriteAsync, array range-slicing. - Dropped [SupportedOSPlatform] hints (net48 is single-platform). deploy/build-package.ps1: publish framework-dependent (no self-contained). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -47,12 +47,12 @@ try {
|
||||
$pkgDir = Join-Path $staging 'RIOJoy'
|
||||
New-Item -ItemType Directory -Force -Path $pkgDir | Out-Null
|
||||
|
||||
# 1. Publish the tray app into riojoy\app (self-contained win-x64 — no .NET on target).
|
||||
# 1. Publish the tray app into riojoy\app (net48, framework-dependent — relies on
|
||||
# the in-box .NET Framework 4.8 present on every Windows 10/11 machine).
|
||||
$appOut = Join-Path $pkgDir 'app'
|
||||
Write-Host "Publishing RioJoy.Tray ($Configuration, self-contained win-x64)..."
|
||||
Write-Host "Publishing RioJoy.Tray ($Configuration, net48 framework-dependent)..."
|
||||
& dotnet publish (Join-Path $repo 'src\RioJoy.Tray\RioJoy.Tray.csproj') `
|
||||
-c $Configuration -r win-x64 --self-contained true `
|
||||
-p:PublishSingleFile=false -p:DebugType=none `
|
||||
-c $Configuration -p:DebugType=none `
|
||||
-o $appOut | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw 'dotnet publish failed.' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user