Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3844

Support single-file executables

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Packaging
    • Labels:
      None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: