Skip to content

System.DllNotFoundException : NativeBinaries/linux/amd64/libgit2-785d8c4.so #1338

Closed
@Ninds

Description

@Ninds

Enviroment :

Mono JIT compiler version 4.0.4 ((detached/5ab4c0d Fri 6 Nov 18:16:14 GMT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen

Linux xxxxxx 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u2 (2015-07-17) x86_64 GNU/Linux

Debian version : 8.5

LibGit2Sharp v0.22 (installed as Nuget package)

Hi,

When a compiled program using LibGit2Sharp is executed from a directory other than that directory in which the program lives I have the following error :

System.TypeInitializationException : An exception was thrown by the type initializer for LibGit2Sharp.Core.NativeMethods
----> System.DllNotFoundException : NativeBinaries/linux/amd64/libgit2-785d8c4.so
at LibGit2Sharp.Core.Proxy.git_repository_open (System.String path) [0x00000] in :0
at LibGit2Sharp.Repository..ctor (System.String path, LibGit2Sharp.RepositoryOptions options) [0x00000] in :0
--DllNotFoundException
at (wrapper managed-to-native) LibGit2Sharp.Core.NativeMethods:git_libgit2_init ()
at LibGit2Sharp.Core.NativeMethods+LibraryLifetimeObject..ctor () [0x00000] in :0
at LibGit2Sharp.Core.NativeMethods..cctor () [0x00000] in :0

However the shared library NativeBinaries/linux/amd64/libgit2-785d8c4.so exists.

If I rename NativeBinaries/linux/amd64/libgit2-785d8c4.so to libNativeBinaries/linux/amd64/libgit2-785d8c4.so it works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions