Click or drag to resize

UnmanagedLibraryResolverResolveLibraryPath Method

Given a library name, this function attempts to resolve the file path from which it can be loaded. Each step of the search strategy uses the fallback library names if the given name was not found in the current step. If the search is unsuccessfully, the library name is returned which means the OS will try and do its own search strategy when attempting to load the library (this is dependent on the OS). The search strategy is the following, in order of execution:

  1. Search user-specified probing paths.
  2. Search {AppBaseDirectory}/runtimes/{RID}/native/.
  3. Search {AppBaseDirectory}/.
  4. Search nuget package path, e.g. {UserProfile}/.nuget/packages/{PackageId}/{PackageVersion}/runtimes/{RID}/native/.

The search strategy gives priority to user-specified probing paths, then local paths to the application, then finally examining the global nuget cache. The RID is the Runtime Identifier based on the platform/architecture, see also Microsoft's RID Catalog.


Namespace: Internal.Assimp.Unmanaged
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public string ResolveLibraryPath(
	string libName
)

Parameters

libName  String
Name of the library to attempt to resolve.

Return Value

String
Full file path to the library, or the file name if not found (e.g. "libXYZ.so").
See Also