Closed Symbianx closed 7 years ago
I have the same issue on Mac Os(
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundExcepti
on: git2-381caf5
at (wrapper managed-to-native) LibGit2Sharp.Core.NativeMethods:git_libgit2_init ()
at LibGit2Sharp.Core.NativeMethods+LibraryLifetimeObject..ctor () [0x00006] in <09955a9a1ab74ea48369d47718fc9eb5>:0
at LibGit2Sharp.Core.NativeMethods..cctor () [0x00058] in <09955a9a1ab74ea48369d47718fc9eb5>:0
--- End of inner exception stack trace ---
at LibGit2Sharp.Core.NativeMethods+LibraryLifetimeObject.Finalize () [0x00000] in <09955a9a1ab74ea48369d47718fc9eb5>:0```
I'm seeing the same thing on Ubuntu 16. Under tools/Addins/Cake.Git
I have a file called LibGit2Sharp.dll
, and under tools/Addins/Cake.Git/lib/linux/x86_64
I have libgit2-381caf5.so
, as per @Symbianx mentioned above.
@Symbianx @liddellj Found issue for Linux, you likely need to install libcurl3
. Run sudo get-get install libcurl3
.
@kuzyasun haven't had chance to check Mac yet. will push a new version with newer Libgit shortly though.
I've solved my problem just copied file libgit2-381caf5.dylib from lib to tools\Addins\Cake.Git\libgit2-381caf5.dylib
@kuzyasun Interesting. Just pushed a new version ( https://www.nuget.org/packages/Cake.Git/0.12.0 ), it should be avail shortly. It uses a newer version of Libgit. Please see if that have the same issue if so we would just move up the dylib one level. New native version is libgit2-a5cf255.
@kuzyasun at least integration tests executed fine on Mac & Linux with latest version: https://travis-ci.org/WCOMAB/Cake_Git/jobs/190659823
@devlead I already had libcurl3 installed. Removing the tools folder to force the download of the new version you released worked. 🎉 🙌
@Symbianx excellent 👍
Hello, I'm trying to run a build script that uses this addin, although it works on Windows, I'm not able to use it on Ubuntu, the error says:
There is a file named
libgit2-381caf5.so
in thetools/Addins/Cake.Git/lib/linux/x86_64
folder, is this a naming inconsistency issue? Am I missing something?Thank you