libgit2 / libgit2/libgit2sharp
The entry point "git_libgit2_init" was not found in the DLL "git2-a418d9d"
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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)
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,在裝有 .NET Framework 4.8 的 Windows 10 上使用 LibGit2Sharp 0.30.0 和 NativeBinaries 2.0.322 重現此故障。追蹤 LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary,並檢查位於 lib/win32/x64/git2-a418d9d.dll 的原生 DLL,重點關注缺少的 git_libgit2_init 進入點。當 Repository.Clone 能夠成功執行且不再出現 TypeInitializationException 時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, git
- 領域
- operating-systems, tooling
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 32/100