-
Notifications
You must be signed in to change notification settings - Fork 64
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
The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception #79
Comments
Which version of .NET is installed? Currently libgit2sharp requires .NET 4.7.2 / .NET Core 2, there's PR fir Libgit2Sharp to support 4.6.1 and once that's published I'll release a new version of Cake.Git. |
@vpaulino do you know what resolved this issue? I am seeing the same issue. |
@vpaulino @RickRen7575 Did you resolve the issue or if it is resolved, possible to explain how it solved? Cake.Git Version: 0.21.0 |
sorry for my disapearing on this. From what I recall on this the problem was the framework dotnet installed on the machine.. it was installed .Net 4.6, after upgrade it works. Sorry for the late answer... 2 years after. |
I am having this issue on MacOS. I'm using Cake 3.0.0, Cake.Git 3.0.0, and dotnet 7.0.102 |
Same here, on a Mac M1 now getting this error using Cake 2.0.0, Cake.Git 2.0.0, and tried with dotnet 7.0.203 and dotnet 6.0.408. |
@ehuna I managed to work around the issue by installing version |
@CDTR-MattConroy thanks, we tried but that did not work for us. We ended up using git directly and no longer using Cake.Git. For example instead of using GitLogTip(), we wrote our own like this -
|
Cake.Git does not work on MacOS (cake-contrib/Cake_Git#79) We only used it to get the current branch name so we can just call git directly to get it instead.
* Remove use of Cake.Git Cake.Git does not work on MacOS (cake-contrib/Cake_Git#79) We only used it to get the current branch name so we can just call git directly to get it instead. * Update version
Hi there
Im using package=Cake.Git on my cake script.... and it works on my machine :) but when I execute my build in my Jenkins CI it happens an error during script execution reporting an error with this log: "The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception".
My Cake.Git package version is the lastest Cake.Git.0.19.0 and the agent OS is Microsoft Windows Server Version 1607 (OS Build 14393.2485).
Does anyone knows anything about this ?
The text was updated successfully, but these errors were encountered: