libgit2 / libgit2/libgit2sharp

The entry point "git_libgit2_init" was not found in the DLL "git2-a418d9d"

オープン
#2,126 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Windows 10 上の .NET Framework 4.8 で 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。