xiAPI.NET.CrossPlatform
Drop-in replacement for xiAPI (net48 + net8/net9). No native binaries. Works cross platform.
Install
| Product | Versions |
|---|---|
| .NET | |
| Other |
README
xiApi.NET.CrossPlatform
A drop-in replacement package that works as XIMEA’s xiAPI .NET but works smoothly across platforms and target frameworks.
- ✅ Adds a cross-platform unmanaged resolver so XIMEA’s hard-coded
xiapi64.dllname also works on Linux/macOS (maps tolibm3api.so/libm3api.dylib) - ✅ Zero code changes in your app — just install the package
Why? XIMEA’s .NET wrapper P/Invokes
xiapi64.dll. That name is fine on Windows, but not on Linux/macOS where the native library is named differently. This package patches that gap.
Install
dotnet add package xiApi.NET.CrossPlatform
Or via NuGet Package Manager.
The package replaces XIMEA’s managed wrapper. You don’t need to add a separate reference to
xiApi.NETX64.dll.
Usage
No need to setup something, just use XIMEA’s API as usual:
using xiApi;
unsafe
{
int num;
var err = ximeaApi.xiGetNumberDevices(&num);
if (err != 0) throw new InvalidOperationException($"xiGetNumberDevices error {err}");
}
Deployment notes
Native library location
On Windows, the vendor name matches, so the OS loader finds xiapi64.dll normally (either from PATH or app folder).
On Linux/macOS, make sure the native library from the XIMEA SDK can be found. The resolver tries, in order:
- System/default search (
ldconfigpaths on Linux, DYLD on macOS) - App directory (
AppContext.BaseDirectory)
License
- Resolver code: MIT (this package).
- XIMEA managed/native libraries: subject to XIMEA’s licenses. Ensure you have rights to redistribute/use them in your environment.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.