Could not load dll 'git2.dll' Could not find the specified module

I am trying to use libgit2sharp in a web project. The problem is that the libgit2sharp solution is for VS2010, and I am using VS2008. Therefore, I had to create a new solution and change the code so as not to use the default parameters. This is not a problem, except that I get the exception indicated in the header when I try to use the compiled libgit2sharp library.

I tried to connect to git2.dll, but that did not help. Copying git2.dll to a web project also did not help.

Change . The issue was resolved in the LibGit2Sharp tracker issue: https://github.com/libgit2/libgit2sharp/issues/39

+4
source share
1 answer

At the top of my head, I would say that git2.dll(the compiled version of the C library libgit2 ) is not in your output directory ( bin\[Release|Debug]).

Since git2.dllit is not a managed dependency, you cannot reference it from your project.

However, thanks to the pre-build event, you should be able to copy the binary to the output directory.

Another option would be to link to the DLL file from your solution and change its properties to make it "copied if newer" (see below)

enter image description here

If you encounter any problems, create a problem in tracking errors .

It will be easier to track; -)

UPDATE:

, , libgit2.dll , LibGit2Sharp.dll. , , .

git2.dll ( C libgit2 (bin\[Release|Debug]).

+8

All Articles