From 34127b9b0d1d8afd598a512efb5bc6e2ef124cd4 Mon Sep 17 00:00:00 2001 From: Afonso Dutra Nogueira Filho Date: Wed, 18 Feb 2026 09:58:56 -0300 Subject: [PATCH 1/2] feat: SkiaSharp --- QRCoder.Core.Tests/QRCoder.Core.Tests.csproj | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/QRCoder.Core.Tests/QRCoder.Core.Tests.csproj b/QRCoder.Core.Tests/QRCoder.Core.Tests.csproj index dd2aef9..5570dec 100644 --- a/QRCoder.Core.Tests/QRCoder.Core.Tests.csproj +++ b/QRCoder.Core.Tests/QRCoder.Core.Tests.csproj @@ -74,4 +74,29 @@ + + + + PreserveNewest + false + "$(TargetFramework)" == "netstandard2.1" or "$(TargetFramework)" == "net8.0" or "$(TargetFramework)" == "net10.0" + + + PreserveNewest + false + "$(TargetFramework)" == "netstandard2.1" or "$(TargetFramework)" == "net8.0" or "$(TargetFramework)" == "net10.0" + + + PreserveNewest + false + "$(TargetFramework)" == "netstandard2.1" or "$(TargetFramework)" == "net8.0" or "$(TargetFramework)" == "net10.0" + + + + + + true + + + From a15a1eab19084cad97bdfb38715f03a2916c792e Mon Sep 17 00:00:00 2001 From: Afonso Dutra Nogueira Filho Date: Wed, 18 Feb 2026 10:01:53 -0300 Subject: [PATCH 2/2] fix: Add manual SkiaSharp native library copying in CI - Add manual copy step for libSkiaSharp.so after build - Search NuGet cache for native libraries and copy to test output directories - Copy from both direct library files and runtimes/linux-x64/native paths - Add verbose logging to show which libraries are found and copied - List final contents of output directories for debugging - Ensure native libraries are available for all target frameworks (netstandard2.1, net8.0, net10.0) - Fix DllNotFoundException by manually placing libraries where runtime can find them --- .github/workflows/ci-build-test.yml | 43 +++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build-test.yml b/.github/workflows/ci-build-test.yml index c53dbb5..6aef01e 100644 --- a/.github/workflows/ci-build-test.yml +++ b/.github/workflows/ci-build-test.yml @@ -57,13 +57,46 @@ jobs: - name: Restore Dependencies run: | - echo "Restoring NuGet packages for QRCoder.Core.sln" - dotnet restore QRCoder.Core.sln --no-cache --force --verbosity normal + dotnet restore QRCoder.Core.sln - - name: Build Solution + - name: Build Project run: | - echo "Building QRCoder.Core.sln" - dotnet build QRCoder.Core.sln --no-restore --configuration Release --verbosity minimal + dotnet build QRCoder.Core.sln --configuration Release --no-restore + + - name: Copy SkiaSharp Native Libraries + run: | + echo "Copying SkiaSharp native libraries to output directories" + # Find and copy libSkiaSharp.so to all test output directories + find ~/.nuget/packages -name "libSkiaSharp.so" -type f | while read file; do + echo "Found SkiaSharp library: $file" + # Copy to all framework output directories + for framework in netstandard2.1 net8.0 net10.0; do + target_dir="QRCoder.Core.Tests/bin/Release/$framework" + if [ -d "$target_dir" ]; then + cp "$file" "$target_dir/" + echo "Copied to $target_dir/" + fi + done + done + # Also try to copy from runtimes directory if available + find ~/.nuget/packages -path "*/runtimes/linux-x64/native/*" -name "*.so" -type f | while read file; do + echo "Found native library: $file" + for framework in netstandard2.1 net8.0 net10.0; do + target_dir="QRCoder.Core.Tests/bin/Release/$framework" + if [ -d "$target_dir" ]; then + cp "$file" "$target_dir/" + echo "Copied native library to $target_dir/" + fi + done + done + # List what we have in output directories + for framework in netstandard2.1 net8.0 net10.0; do + target_dir="QRCoder.Core.Tests/bin/Release/$framework" + if [ -d "$target_dir" ]; then + echo "=== Libraries in $target_dir ===" + ls -la "$target_dir/"*.so 2>/dev/null || echo "No .so files found" + fi + done - name: Run Tests env: