libgit2 / libgit2/libgit2sharp
The entry point "git_libgit2_init" was not found in the DLL "git2-a418d9d"
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I try to use LibGit2Sharp within my .NetFw 4.8 Project and stuck with an error when trying to use the lib.
It seems to not be able to load/read from the NativeLibaries file correctly.
Reproduction steps:
Add nuget-Packages to your project:
<package id="LibGit2Sharp" version="0.30.0" />
<package id="LibGit2Sharp.NativeBinaries" version="2.0.322" />
Build will create files in the output directory as expected "/lib/win32/x64/git2-a418d9d.dll"
Call Any Method. For example: Repository.Clone(pullurl, workingdir);
Expected behavior:
Execute of "clone" command sucessfully finished.
Actual behavior:
The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
The Stacktrace:
Unexpected exception occurred: System.TypeInitializationException: The type initializer for "LibGit2Sharp.Core.NativeMethods" threw an exception. ---> System.EntryPointNotFoundException: The entry point "git_libgit2_init" was not found in the DLL "git2-a418d9d". at LibGit2Sharp.Core.NativeMethods.git_libgit2_init() at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()...
Version of LibGit2Sharp
0.30.0
Version of NativeBinaries
2.0.322
OS: Windows 10 based
.NetFW: 4.8 C#7 (SDK 6 & 8 installed)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with LibGit2Sharp 0.30.0 and NativeBinaries 2.0.322 on Windows 10 with .NET Framework 4.8. Trace LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary and inspect the native DLL at lib/win32/x64/git2-a418d9d.dll, focusing on the missing git_libgit2_init entry point. Done means Repository.Clone executes successfully without the TypeInitializationException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100