libgit2 / libgit2/libgit2sharp
Error loading DLL git2-3f4182d on Windows (module not found)
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm developing a Visual Studio 2022 extension that uses LibGit2Sharp to retrieve Git repository information (such as the current branch name) and to manage open documents based on the active branch. However, when running my extension on Windows, I encounter the following error:
Unable to load DLL 'git2-3f4182d': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I noticed that the LibGit2Sharp.dll.config file only contains dllmap entries for Linux and macOS, with no mapping for Windows. Despite installing the LibGit2Sharp.NativeBinaries package and verifying that the project’s platform configuration (x86 vs x64) matches the deployed binaries, the error persists.
I'm running on .net 4.7.2. The code is pretty simple since it's an R&D POC.
string testDir = "";
try
{
using (var repo = new Repository(_repoPath))
{
testDir = repo.Head?.FriendlyName;
}
}
_repoPath is not empty, and it exists as the current Git repository. (with an .git folder)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、.NET 4.7.2 上の Visual Studio 2022 拡張機能で Repository の呼び出しを再現し、次に LibGit2Sharp.dll.config とインストールされている LibGit2Sharp.NativeBinaries のデプロイを調べます。Windows ネイティブ DLL の検索方法と、デプロイされたアーキテクチャが拡張機能と一致しているかを確認します。リポジトリが開き、DLL の読み込みエラーなしで repo.Head.FriendlyName を読み取れる状態を完了とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- devtools, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100