Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Ninds opened this issue Jul 11, 2016 · 2 comments
Closed

Comments

@Ninds
Copy link

Ninds commented Jul 11, 2016

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

@ethomson
Copy link
Member

This is a dup of #1170, which has been fixed.

This should work if you install a current prerelease LibGit2Sharp (simply check the "include prereleases" box in your package manager and select the newest.

@Ninds
Copy link
Author

Ninds commented Jul 11, 2016

Great thanks.
When will the pre-release become the release ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants