From c392c460ad3d43714361dd57e2c226a1b82feed2 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 12 Feb 2026 21:19:19 +0000
Subject: [PATCH 1/3] Initial plan
From 1ea2b0865a46083c7a70dbd760d05903873f606c Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 12 Feb 2026 21:22:30 +0000
Subject: [PATCH 2/3] Fix test-nuget on macOS by rewriting csproj with proper
configuration
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
---
.github/workflows/nightly-validation.yml | 42 +++++++++++++++++++-----
1 file changed, 34 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/nightly-validation.yml b/.github/workflows/nightly-validation.yml
index 73c79704b..8a0e5cd0f 100644
--- a/.github/workflows/nightly-validation.yml
+++ b/.github/workflows/nightly-validation.yml
@@ -165,10 +165,23 @@ jobs:
cd test-nuget
dotnet new console
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
- # Add RuntimeIdentifier to ensure native library is loaded correctly
- sed -i '' '/<\/PropertyGroup>/i\
- osx-x64\
- ' test-nuget.csproj
+ # Configure project to properly load native dependencies on macOS x64
+ # Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
+ cat > test-nuget.csproj << 'CSPROJ'
+
+
+ Exe
+ net8.0
+ enable
+ enable
+ osx-x64
+ AnyCPU
+
+
+
+
+
+ CSPROJ
- name: Create test code
run: |
@@ -224,10 +237,23 @@ jobs:
cd test-nuget
dotnet new console
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
- # Add RuntimeIdentifier to ensure native library is loaded correctly
- sed -i '' '/<\/PropertyGroup>/i\
- osx-arm64\
- ' test-nuget.csproj
+ # Configure project to properly load native dependencies on macOS ARM64
+ # Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
+ cat > test-nuget.csproj << 'CSPROJ'
+
+
+ Exe
+ net8.0
+ enable
+ enable
+ osx-arm64
+ AnyCPU
+
+
+
+
+
+ CSPROJ
- name: Create test code
run: |
From fc6140e4898a2f583518b77814190adeb3d7fbe6 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 12 Feb 2026 21:24:22 +0000
Subject: [PATCH 3/3] Remove RuntimeIdentifier to fix assembly loading on macOS
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
---
.github/workflows/nightly-validation.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/nightly-validation.yml b/.github/workflows/nightly-validation.yml
index 8a0e5cd0f..374f522ba 100644
--- a/.github/workflows/nightly-validation.yml
+++ b/.github/workflows/nightly-validation.yml
@@ -166,7 +166,8 @@ jobs:
dotnet new console
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
# Configure project to properly load native dependencies on macOS x64
- # Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
+ # Use AnyCPU without RuntimeIdentifier to avoid architecture mismatch
+ # The .NET runtime will automatically select the correct native library from runtimes/osx-x64/native/
cat > test-nuget.csproj << 'CSPROJ'
@@ -174,7 +175,6 @@ jobs:
net8.0
enable
enable
- osx-x64
AnyCPU
@@ -238,7 +238,8 @@ jobs:
dotnet new console
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
# Configure project to properly load native dependencies on macOS ARM64
- # Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
+ # Use AnyCPU without RuntimeIdentifier to avoid architecture mismatch
+ # The .NET runtime will automatically select the correct native library from runtimes/osx-arm64/native/
cat > test-nuget.csproj << 'CSPROJ'
@@ -246,7 +247,6 @@ jobs:
net8.0
enable
enable
- osx-arm64
AnyCPU