net8.0: upgrade from netcoreapp3.1, fix Linux rendering

- TFM: netcoreapp3.1 → net8.0, netstandard2.1 → net8.0
- System.Drawing.Common 5.0.3 → 6.0.0 (last version with Unix support)
- Remove stale packages (NETStandard.Library, System.Collections)
- Set System.Drawing.EnableUnixSupport via runtimeconfig + AppContext
- Pin System.Resources.Extensions 8.0.0, suppress NU1603
- Copy game_folder assets to build output (no run.sh required)
- Sta.CurrentDirectory → AppContext.BaseDirectory for portable path resolution
- Enable UnsafeBinaryFormatterSerialization + InvariantGlobalization
- Add global.json pinning SDK to 8.x
- Remove ambiguous `using System.Net.Mime.MediaTypeNames` in ParT.cs
- Add `using System.Reflection` to Program.cs
This commit is contained in:
2026-06-13 13:18:28 +02:00
parent dc27a5cf59
commit 636a078c3b
8 changed files with 38 additions and 13 deletions

View File

@@ -4,7 +4,7 @@
<AssemblyName>SlaveMatrix</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
@@ -14,10 +14,17 @@
<PropertyGroup>
<ApplicationIcon>app.ico</ApplicationIcon>
<RootNamespace />
<InvariantGlobalization>true</InvariantGlobalization>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<NoWarn>CA1416</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\2DGAMELIB\2DGAMELIB.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="..\game_folder\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>