Reputation: 1
I recently tried to use libGit2Sharp within my .Net Project. It´s a x64-compiled dotnetFW 4.8 (c#7) application.
Sadly i got a 'System.EntryPointNotFoundException' threw from "NativeMethods" really quick.
Here ist my simplified debug code:
string workingdir = @"D:\<user>\repo";
string pullurl = "<some_pull_link>";
Repository.Clone(pullurl, workingdir); //<- threw the exception
using (var git_repo = new Repository(@"D:\<user>\repo")) {
RepositoryStatus status = git_repo.RetrieveStatus();
Commands.Checkout(git_repo, "int");
}
package refs:
<packages>
<package id="LibGit2Sharp" version="0.30.0" />
<package id="LibGit2Sharp.NativeBinaries" version="2.0.322" />
Error Stack:
'InnerException' threw an exception of type 'System.EntryPointNotFoundException'
at LibGit2Sharp.Core.NativeMethods.git_clone(git_repository*& repo, String origin_url, FilePath workdir_path, GitCloneOptions& opts)
at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in /_/LibGit2Sharp/Core/Proxy.cs:Row 278.
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in /_/LibGit2Sharp/Repository.cs:Row 824.
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath) in /_/LibGit2Sharp/Repository.cs:Row 758.
...
Target: Int32 git_clone(LibGit2Sharp.Core.git_repository* ByRef, System.String, LibGit2Sharp.Core.FilePath, LibGit2Sharp.Core.GitCloneOptions ByRef)
I tried to compile and add the native libGit2 source and set the compiled Assemblies as reference to my Project, but had no luck.
Anyone knows whats missing here?
Upvotes: 0
Views: 53