libgit2 / libgit2/libgit2sharp

The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. "Unable to load DLL 'git2-572e4d8': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

未關閉
#1,681 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C#
星號
3.5k
分支
925
PR 合併指標
30 天內沒有已合併 PR

描述

We are also getting the same exception. We are using Azure Function and using v0.26.0 of LibGit2Sharp. This exception arises when we are debugging our azure function using Azure CLI debugger.
We have already tried adding 'AutoGenerateBindingRedirects true AutoGenerateBindingRedirects' to csproj file of the project but still no luck. Though it runs fine in console app but is throwing exception in Azure function.
Here is the stack trace:
at LibGit2Sharp.Core.NativeMethods.git_repository_open(git_repository*& repository, FilePath path)
at LibGit2Sharp.Core.Proxy.git_repository_open(String path)
at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter)
at LibGit2Sharp.Repository..ctor(String path)
at GitDeploy.GitRepositoryManager.UpdateRepository()
at CrmSolution.RepositoryHelper.TryPushToRepository(String committerName, String committerEmail, String authorEmail, SolutionFileInfo solutionFile, String solutionFilePath, HashSet`1 hashSet)
at CrmSolution.RepositoryHelper.TryUpdateToRepository(String solutionUniqueName, String committerName, String committerEmail, String authorEmail)

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從堆疊追蹤中的 LibGit2Sharp.Core.NativeMethods 進入點和 Repository 建構函式開始,透過 Azure CLI 偵錯 Azure Function 的同時重現失敗情況。比較主控台應用程式和 Azure Function 的部署環境,並考慮在原生模組 git2-572e4d8 成功載入且存放庫作業在沒有此例外的情況下執行時所完成的工作。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp, git
領域
cloud, devtools
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。