|
If you publish an application as a single-file executable and bundle the libmongocrypt.so shared library using the IncludeNativeLibrariesForSelfExtract option:
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --no-self-contained -p:IncludeNativeLibrariesForSelfExtract=true
|
When you run the application, LibraryLoader cannot find libmongocrypt.so:
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
|
at System.IO.Path.Combine(String path1, String path2, String path3)
|
at MongoDB.Libmongocrypt.LibraryLoader.FindLibrary(IList`1 basePaths, String[] suffixPaths, String library)
|
at MongoDB.Libmongocrypt.LibraryLoader..ctor()
|
...
|
This should be checked on Windows and OSX as well to determine if this is a Linux-specific problem or whether it is due to the extraction location used by single-file executables.
|