From 06908872d13b59d701f33ed8bf312ce7d6a5bf41 Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Fri, 13 Nov 2026 12:22:55 +0000 Subject: [PATCH] Target the WinForms samples at Windows 10 so their packages restore cleanly Part of #542. SkiaSharp.Views.WindowsForms 3.119.0, which ScottPlot.WinForms brings in, ships .NET assets only for net8.0-windows10.0.19041. A project targeting net10.0-windows (Windows 7.0) cannot use them, so NuGet fell back to the .NETFramework 4.6.2 assets and their dependencies, OpenTK and OpenTK.GLControl 3.1.0, raising NU1701 three times in each sample. Targeting net10.0-windows10.0.19041.0 selects the .NET assets, which depend on OpenTK 4.8.2 and OpenTK.GLControl 4.0.1 instead; both samples restore and build with no warning. Also spell `dotnet run --project` in the C++ build, where `-p` raised NETSDK1174. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CPPBuild.yml | 2 +- Sources/Samples/AngouriMathPlot/AngouriMathPlot.csproj | 2 +- Sources/Samples/GraphicExample/GraphicExample.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CPPBuild.yml b/.github/workflows/CPPBuild.yml index 512dfdac2..b9a486c33 100644 --- a/.github/workflows/CPPBuild.yml +++ b/.github/workflows/CPPBuild.yml @@ -53,7 +53,7 @@ jobs: - name: 'Generating exports' run: | cd Sources/Utils - dotnet run -p Utils ExportsGenerator + dotnet run --project Utils ExportsGenerator - name: 'Install some libs for Linux' if: ${{ matrix.os == 'ubuntu-latest' }} diff --git a/Sources/Samples/AngouriMathPlot/AngouriMathPlot.csproj b/Sources/Samples/AngouriMathPlot/AngouriMathPlot.csproj index 64a6728a2..5987dc2fc 100644 --- a/Sources/Samples/AngouriMathPlot/AngouriMathPlot.csproj +++ b/Sources/Samples/AngouriMathPlot/AngouriMathPlot.csproj @@ -1,7 +1,7 @@  - net10.0-windows + net10.0-windows10.0.19041.0 true diff --git a/Sources/Samples/GraphicExample/GraphicExample.csproj b/Sources/Samples/GraphicExample/GraphicExample.csproj index e48f5ec4b..3d2b7c234 100644 --- a/Sources/Samples/GraphicExample/GraphicExample.csproj +++ b/Sources/Samples/GraphicExample/GraphicExample.csproj @@ -2,7 +2,7 @@ WinExe - net10.0-windows + net10.0-windows10.0.19041.0 true