Summary
On a Windows ARM64 machine, an application targeting .NET Framework 4.7.2 (net472) fails to load SharpSvn.dll with:
Could not load file or assembly 'SharpSvn, Version=1.14005.366.0, Culture=neutral, PublicKeyToken=d729672594885a28' or one of its dependencies.
An attempt was made to load a program with an incorrect format. (BadImageFormatException)
The host process is ARM64, and SharpSvn.dll is also ARM64 (PE Machine: 0xAA64). However, because the ARM64 RID in the NuGet package only provides lib/net6.0 assets (no net46/net48), the net472 CLR cannot load the ARM64 .NET 6 mixed‑mode C++/CLI assembly in‑proc, leading to BadImageFormatException.
x86/x64 work fine using runtimes/win-x86|win-x64/lib/net46, but ARM64 consistently fails for net472.
Environment
- Application TargetFramework:
net472
- Host OS: Windows 11 ARM64
OS: Microsoft Windows 10.0.26200 | OSArch: Arm64
Process: 64-bit | ProcArch: Arm64
Host EXE machine: ARM64
- SharpSvn NuGet:
SharpSvn 1.14005.366
- Runtimes present:
runtimes\win-x86\lib\net46 ✅
runtimes\win-x64\lib\net46 ✅
runtimes\win-arm64\lib\net6.0 ✅
- Missing:
runtimes\win-arm64\lib\net46 / net48 ❌
What we deployed
- x86: from
runtimes\win-x86\lib\net46 → works
- x64: from
runtimes\win-x64\lib\net46 → works
- ARM64: from
runtimes\win-arm64\lib\net6.0 → fails with BadImageFormatException
ARM64 file list (examples):
Ijwhost.dll
SharpSvn.dll
SharpSvn.xml
SharpPlink-*.svnExe
SharpSvn-DB44-20-*.svnDll
Logs
OS: Microsoft Windows 10.0.26200 | OSArch: Arm64
Process: 64-bit | ProcArch: Arm64
Host EXE machine: ARM64
SharpSvn.dll Machine: 0xAA64
Unhandled exception reading assembly name from '...\arm64\SharpSvn.dll':
Could not load file or assembly 'SharpSvn, Version=1.14005.366.0...'
An attempt was made to load a program with an incorrect format.
Expected behavior
- Either:
- Publish ARM64 assets for .NET Framework (
net46/net48) alongside x86/x64, so net472 hosts can load SharpSvn in‑proc on ARM64; or
- Document that ARM64 is only supported for .NET 6+, and provide guidance for out‑of‑proc usage from .NET Framework hosts.
Actual behavior
- ARM64 hosts running net472 cannot load
SharpSvn.dll from win-arm64\lib\net6.0; CLR throws BadImageFormatException.
Repro steps
- Create a simple net472 app on Windows ARM64.
- Reference SharpSvn 1.14005.366.
- At runtime, load files from:
runtimes\win-x64\lib\net46 → works
runtimes\win-arm64\lib\net6.0 → fails with BadImageFormatException.
Analysis
- SharpSvn embeds native Subversion/APR/OpenSSL payloads and uses C++/CLI IJW with
Ijwhost.dll.
- NuGet selects RID + TFM assets; ARM64 only has net6.0, not net46/net48.
- A net472 CLR cannot load a mixed-mode .NET 6 assembly.
What would help
- Add ARM64 assets for .NET Framework (
net46/net48).
- Or document ARM64 as .NET 6-only and provide an official workaround pattern.
Summary
On a Windows ARM64 machine, an application targeting .NET Framework 4.7.2 (net472) fails to load
SharpSvn.dllwith:The host process is ARM64, and
SharpSvn.dllis also ARM64 (PE Machine: 0xAA64). However, because the ARM64 RID in the NuGet package only provideslib/net6.0assets (nonet46/net48), the net472 CLR cannot load the ARM64 .NET 6 mixed‑mode C++/CLI assembly in‑proc, leading toBadImageFormatException.x86/x64 work fine using
runtimes/win-x86|win-x64/lib/net46, but ARM64 consistently fails for net472.Environment
net472OS: Microsoft Windows 10.0.26200 | OSArch: Arm64Process: 64-bit | ProcArch: Arm64Host EXE machine: ARM64SharpSvn 1.14005.366runtimes\win-x86\lib\net46✅runtimes\win-x64\lib\net46✅runtimes\win-arm64\lib\net6.0✅runtimes\win-arm64\lib\net46/net48❌What we deployed
runtimes\win-x86\lib\net46→ worksruntimes\win-x64\lib\net46→ worksruntimes\win-arm64\lib\net6.0→ fails withBadImageFormatExceptionARM64 file list (examples):
Logs
Expected behavior
net46/net48) alongside x86/x64, so net472 hosts can load SharpSvn in‑proc on ARM64; orActual behavior
SharpSvn.dllfromwin-arm64\lib\net6.0; CLR throwsBadImageFormatException.Repro steps
runtimes\win-x64\lib\net46→ worksruntimes\win-arm64\lib\net6.0→ fails withBadImageFormatException.Analysis
Ijwhost.dll.What would help
net46/net48).