3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-15 02:06:34 +00:00
z3/src/api/dotnet
Copilot b6c7ef2f68
dotnet: force PlatformTarget=AnyCPU to fix arm64 host load failure (#9868)
`Microsoft.Z3.dll` was being emitted with PE `Machine=0x8664` (AMD64)
despite being pure IL, because the Windows x64 CI environment
(`vcvarsall.bat x64`) injects `Platform=x64` into MSBuild, which sets
the COFF machine type when `PlatformTarget` is not explicitly specified.
This causes `FS0193` / architecture mismatch errors on any arm64 .NET
host (macOS Apple Silicon, Linux aarch64, Windows on ARM).

## Changes

- **`scripts/mk_util.py`** — Add
`<PlatformTarget>AnyCPU</PlatformTarget>` to the in-memory `.csproj`
template generated by the Python build system (`mk_win_dist.py`,
`mk_unix_dist.py`)
- **`src/api/dotnet/Microsoft.Z3.csproj.in`** — Add
`<PlatformTarget>AnyCPU</PlatformTarget>` to the CMake build system
template

Both paths now produce `Machine=0x014C` (i386/AnyCPU) regardless of host
or CI environment, matching the assembly's actual nature (`ILONLY=True`,
`32BIT_REQUIRED=False`). The native side already ships six RIDs; no
changes needed there.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-16 09:52:04 -06:00
..
Properties
AlgebraicNum.cs
ApplyResult.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
ArithExpr.cs
ArithSort.cs
ArrayExpr.cs
ArraySort.cs
AST.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
ASTMap.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
ASTVector.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
BitVecExpr.cs
BitVecNum.cs
BitVecSort.cs
BoolExpr.cs
BoolSort.cs
CharSort.cs
cmake_install_gac.cmake.in
cmake_uninstall_gac.cmake.in
CMakeLists.txt Fix ARM64 nightly build: dotnet NuGet packaging broken under Ninja/cmake (#9589) 2026-05-21 11:18:03 -07:00
Constructor.cs #7003 2023-11-19 09:59:44 -08:00
ConstructorList.cs
Context.cs update ignore 2026-05-21 10:37:36 -07:00
DatatypeExpr.cs
DatatypeSort.cs
EnumSort.cs
Expr.cs Add missing API methods across language bindings (#8150) 2026-02-18 20:57:08 -08:00
FiniteDomainExpr.cs
FiniteDomainNum.cs
FiniteDomainSort.cs
FiniteSetSort.cs Add finite set API support for C# and Java bindings (#8003) 2025-11-04 15:57:55 -08:00
Fixedpoint.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
FPExpr.cs
FPNum.cs fix dotnet build errors 2026-02-18 20:56:02 -08:00
FPRMExpr.cs
FPRMNum.cs
FPRMSort.cs
FPSort.cs
FuncDecl.cs
FuncInterp.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
Global.cs
Goal.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
IntExpr.cs
IntNum.cs
IntSort.cs
IntSymbol.cs
Lambda.cs
ListSort.cs
Log.cs fix dotnet build errors 2026-02-18 20:56:02 -08:00
Microsoft.Z3.csproj.in dotnet: force PlatformTarget=AnyCPU to fix arm64 host load failure (#9868) 2026-06-16 09:52:04 -06:00
Microsoft.Z3.props Fix ARM64 nightly build: dotnet NuGet packaging broken under Ninja/cmake (#9589) 2026-05-21 11:18:03 -07:00
Microsoft.Z3.Sharp.pc.in
Microsoft.Z3.snk
Microsoft.Z3.targets Fix ARM64 nightly build: dotnet NuGet packaging broken under Ninja/cmake (#9589) 2026-05-21 11:18:03 -07:00
Microsoft.Z3.targets.in
Model.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
NativeContext.cs
NativeFuncInterp.cs
NativeModel.cs
NativeSolver.cs Add missing C# API functions for solver introspection and congruence closure (#8126) 2026-02-18 20:57:06 -08:00
OnClause.cs build fixes 2023-07-18 19:14:45 -07:00
Optimize.cs Add missing API methods across language bindings (discussion #8701) 2026-02-20 04:24:22 +00:00
ParamDescrs.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
Params.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
Pattern.cs
Probe.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
Quantifier.cs
RatNum.cs
RCFNum.cs fix build 2026-02-18 20:57:14 -08:00
README.md update path reference to readme 2023-12-05 13:47:05 -08:00
RealExpr.cs
RealSort.cs
ReExpr.cs
RelationSort.cs
ReSort.cs
SeqExpr.cs
SeqSort.cs
SetSort.cs
Simplifiers.cs add simplifier to java API 2023-02-02 19:06:26 -08:00
Solver.cs code-simplifier: fix JavaDoc formatting in Context.java and extract ternary in Solver.cs 2026-02-25 21:49:23 +00:00
Sort.cs
Statistics.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
Status.cs
StringSymbol.cs
Symbol.cs Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
Tactic.cs remove DecRefQueue, use Z3_enable_concurrent_dec_ref (#6332) 2022-09-11 18:59:00 -07:00
TupleSort.cs
UninterpretedSort.cs
UserPropagator.cs add on_binding callbacks across APIs 2025-08-07 12:55:50 -07:00
Version.cs
Z3Exception.cs
Z3Object.cs Dotnet Api: Fix infinite finalization of Context (#6361) 2022-09-22 13:25:17 -05:00

Z3 Nuget Package

For more information see the Z3 github page