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:
@@ -32,9 +32,9 @@ public sealed class ProfileWallpaperGenerator
|
||||
string outputPath,
|
||||
OverlayLayoutOptions? options = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(template);
|
||||
ArgumentNullException.ThrowIfNull(labels);
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(outputPath);
|
||||
if (template is null) throw new ArgumentNullException(nameof(template));
|
||||
if (labels is null) throw new ArgumentNullException(nameof(labels));
|
||||
if (string.IsNullOrWhiteSpace(outputPath)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(outputPath));
|
||||
if (string.IsNullOrWhiteSpace(template.BaseImagePath))
|
||||
throw new InvalidOperationException("OverlayTemplate.BaseImagePath is not set.");
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<Platforms>x64</Platforms>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
@@ -12,6 +13,10 @@
|
||||
<!-- SkiaSharp: cross-platform 2D rasterizer used to render the wallpaper. -->
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.8" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Win32" Version="2.88.8" />
|
||||
<PackageReference Include="PolySharp" Version="1.14.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -35,9 +35,9 @@ public sealed class SkiaOverlayRenderer
|
||||
SKBitmap baseImage,
|
||||
OverlayLayoutOptions? options = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(template);
|
||||
ArgumentNullException.ThrowIfNull(labels);
|
||||
ArgumentNullException.ThrowIfNull(baseImage);
|
||||
if (template is null) throw new ArgumentNullException(nameof(template));
|
||||
if (labels is null) throw new ArgumentNullException(nameof(labels));
|
||||
if (baseImage is null) throw new ArgumentNullException(nameof(baseImage));
|
||||
options ??= new OverlayLayoutOptions();
|
||||
|
||||
var output = baseImage.Copy();
|
||||
@@ -114,8 +114,8 @@ public sealed class SkiaOverlayRenderer
|
||||
string outputPath,
|
||||
OverlayLayoutOptions? options = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(template);
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(outputPath);
|
||||
if (template is null) throw new ArgumentNullException(nameof(template));
|
||||
if (string.IsNullOrWhiteSpace(outputPath)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(outputPath));
|
||||
if (string.IsNullOrWhiteSpace(template.BaseImagePath))
|
||||
throw new InvalidOperationException("OverlayTemplate.BaseImagePath is not set.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user