Search code examples
.netasp.net-coreasp.net-core-mvc.net-corelibgit2sharp

.Net Core VS2015, Unable to load DLL 'git2-785d8c4': The specified module could not be found. (Exception from HRESULT: 0x8007007E)


I am working on .Net Core and trying to migrate the >net 4.5 application into .Net core. During this process, i am finding the following error when trying to access git .dll

following is my Project.json:

  "frameworks": {
    "net451": {
      "dependencies": {
        "Data": "1.0.0-*",
        "NLog": "4.3.5",
        "HtmlAgilityPack": "1.4.9",
        "LibGit2Sharp": "0.22.0",
        "RestSharp": "105.2.3",
        "Unofficial.Ionic.Zip": "1.9.1.8"
      }
    }

and here i receives and error on below line of code.

if (Repository.IsValid(basePath) == false)

Namespaces are included:

using LibGit2Sharp;
using LibGit2Sharp.Handlers;

error message is:

Unable to load DLL 'git2-785d8c4': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

i want to know if there is any other method through which i can use this functionality in .Net Core.


Solution

  • Update: Beginning with the August 3rd build of LibGit2Sharp (LibGit2Sharp 0.23.0-pre20160803182831), LibGit2Sharp now supports both regular .NET 4.5 projects (those using .csproj-based solutions) and new-style project.json-based solutions (like introduced in .NET Core).

    Note that LibGit2Sharp still does not support .NET Core, only the new project structure. Please see https://github.com/libgit2/libgit2sharp/pull/1318 for updates.