The entry point "git_libgit2_init" was not found in the DLL "git2-a418d9d"

Ouverte
#2,126 10 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
32/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
csharp, git

Piste de recherche

Commencez par reproduire l’échec avec LibGit2Sharp 0.30.0 et NativeBinaries 2.0.322 sur Windows 10 avec .NET Framework 4.8. Suivez LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary et inspectez la DLL native située dans lib/win32/x64/git2-a418d9d.dll, en vous concentrant sur le point d’entrée git_libgit2_init manquant. C’est terminé lorsque Repository.Clone s’exécute correctement sans la TypeInitializationException.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Hi,

I try to use LibGit2Sharp within my .NetFw 4.8 Project and stuck with an error when trying to use the lib.

It seems to not be able to load/read from the NativeLibaries file correctly.

Reproduction steps:

Add nuget-Packages to your project:

<package id="LibGit2Sharp" version="0.30.0" />
<package id="LibGit2Sharp.NativeBinaries" version="2.0.322" />

Build will create files in the output directory as expected "/lib/win32/x64/git2-a418d9d.dll"

Call Any Method. For example: Repository.Clone(pullurl, workingdir);

Expected behavior:

Execute of "clone" command sucessfully finished.

Actual behavior:

The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.

The Stacktrace:
Unexpected exception occurred: System.TypeInitializationException: The type initializer for "LibGit2Sharp.Core.NativeMethods" threw an exception. ---> System.EntryPointNotFoundException: The entry point "git_libgit2_init" was not found in the DLL "git2-a418d9d". at LibGit2Sharp.Core.NativeMethods.git_libgit2_init() at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()...

Version of LibGit2Sharp
0.30.0

Version of NativeBinaries
2.0.322

OS: Windows 10 based
.NetFW: 4.8 C#7 (SDK 6 & 8 installed)

Langage dominant
C#
Étoiles
3.5k
Forks
925
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de libgit2/libgit2sharp

Toutes les issues de libgit2/libgit2sharp

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.