libgit2 / libgit2/libgit2sharp

LibGit2Sharp: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. LibGit2Sharp: Unable to load DLL 'git2-15e1193': The specified module could not be found.

Open
#1,533 31 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

I'm using Azure Function App to create a app for updating Excel file to our ASP.Net Web Api project, which is hosting in Azure, and we are using Git to control the version of files.

Now, I'm having an issue of using LibGit2Sharp. I'd like to use Commands.Checkout() command to switch between branches. However, I got this issue:
LibGit2Sharp: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. LibGit2Sharp: Unable to load DLL 'git2-15e1193': The specified module could not be found.

I'm using the latest version of LibGit2Sharp version 0.24.0, and I see it depends on LibGit2Sharp.NativeBinaries": "[1.0.185]"

Does anyone who has any idea how to solve this issue on Function App?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names Commands.Checkout(), LibGit2Sharp 0.24.0, and LibGit2Sharp.NativeBinaries 1.0.185; start by reproducing the native DLL load failure in the Azure Function App environment. Check the Function App deployment and runtime setup against the native-binary dependency, then verify that Commands.Checkout() completes without the initializer or missing-module exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, git
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.