Unable to load DLL 'git2.dll' The specified module could not be found

可紊 提交于 2019-12-01 19:44:15

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

As git2.dll is not a managed dependency, you cannot reference it from your project.

However, thanks to a prebuild event, you should be able to copy the binary to your output directory.

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

Should you encounter any problem, please create an issue in the bug tracker.

It will be easier to track ;-)

UPDATE:

In order for this to run, you have to make sure that after compilation, the file libgit2.dll is located in the same directory than the assembly LibGit2Sharp.dll. This way, the dynamic loading of the native library by the assembly will work as expected.

The git2.dll (compiled version of C libgit2 library) should be generated at the top level of your output directory (bin\[Release|Debug]).

More thorough information can be found in the ticket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!