The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception
還沒有人認領這個 Issue。
評估
研究方向
首先,在安裝專案中使用 LibGit2Sharp.Repository.Clone 從進入點 Form1_Load 重現此故障,然後檢查例外中提到的 NativeMethods 型別初始設定式。完成的標準是找出導致例外的安裝或執行階段條件,並記錄可重現的修正方式或缺少的部署需求。
由索引模型根據 Issue 內容生成。
描述
I'm trying create a project to cloned my repository on start. But when i try do this in setup project i receive this message:

The code is simple, but in setup project dont work.
private void Form1_Load(object sender, EventArgs e)
{
LibGit2Sharp.Repository.Clone(@"https://github.com/libgit2/libgit2sharp.git", @"C:\Users\andre\Downloads\test");
}
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
libgit2/libgit2sharp 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 52/100
libgit2/libgit2sharp#2193 · 2 則留言 ·
-
難度 4/5 3-5 天 新手友好度 38/100
libgit2/libgit2sharp#2192 · 1 則留言 ·
-
Website is down 未關閉
難度 4/5 3-5 天 新手友好度 20/100
libgit2/libgit2sharp#2191 · 2 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 68/100
libgit2/libgit2sharp#2189 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 35/100
libgit2/libgit2sharp#2187 · 2 則留言 ·
查看 libgit2/libgit2sharp 的全部 Issue
相似的 Issue
-
Status: Waiting triage Type: Bug
難度 2/5 1-3 小時 新手友好度 84/100
nanoframework/Home#1857 ·
-
kind/bug kind/regression
難度 2/5 1-3 小時 新手友好度 78/100
unoplatform/uno.toolkit.ui#1646 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
nightscout/nocturne#1379 ·
-
難度 2/5 1-3 小時 新手友好度 86/100
elastic/esql-dotnet#47 ·
-
難度 1/5 1 小時以內 新手友好度 85/100