Can't use Library from FSI (Fsharp Interactive): System.DllNotFoundException: Unable to load DLL 'git2-b0d9952': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- fsharp, git
- Domaine
- developer-experience
Piste de recherche
Reproduisez le problème dans une nouvelle session F# Interactive sur Server 2016 avec net471, en utilisant LibGit2Sharp.dll provenant des versions de package indiquées. Comparez la référence d’assembly réussie avec la construction de Repository qui échoue et la tentative de référence à la bibliothèque native git2-b0d9952.dll. C’est terminé lorsque FSI peut référencer et utiliser LibGit2Sharp sans l’erreur de chargement de la bibliothèque native.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Reproduction steps
in a fresh fsi (using ionide ) i can reference LibGit2Sharp.dll and open the LibGit2Sharp namespace, but instantiating a Repository throws following error:
Microsoft (R) F# Interactive version 10.1.0 for F# 4.1
> #r "../../packages/play/LibGit2Sharp/lib/netstandard2.0/LibGit2Sharp.dll";;
--> Referenced 'd:\scripts2dev\libwba\src\play\../../packages/play/LibGit2Sharp/lib/netstandard2.0/LibGit2Sharp.dll' (file may be locked by F# Interactive process)
> open LibGit2Sharp;;
> let repo = new Repository("path\to\repo.git");;
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'git2-b0d9952': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
at LibGit2Sharp.Core.NativeMethods..cctor()
--- End of inner exception stack trace ---
at LibGit2Sharp.Core.NativeMethods.git_repository_open(git_repository*& repository, FilePath path)
at LibGit2Sharp.Core.Proxy.git_repository_open(String path)
at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter)
at <StartupCode$FSI_0003>.$FSI_0003.main@() in d:\scripts2dev\libwba\src\play\LibGit2Sharp.fsx:line 4
Stopped due to error
And I can't reference the dll from LibGit2Sharp.NativeBinaries, because it throws
> #r @"../..\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll";;
LibGit2Sharp.fsx(7,1): error FS0229: Error opening binary file 'd:\scripts2dev\libwba\src\play\../..\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll': d:\scripts2dev\libwba\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll: bad cli header, rva 0
LibGit2Sharp.fsx(7,1): error FS3160: Problem reading assembly 'd:\scripts2dev\libwba\src\play\../..\packages\play\LibGit2Sharp.NativeBinaries\runtimes\win-x64\native\git2-b0d9952.dll': Processing of a script fragment has stopped because an exception has been raised
What am I missing? How can I use the compiled libraries ?
Expected behavior
It is possible to reference and use LibGit2Sharp in fsi
Actual behavior
see above errors
Version of LibGit2Sharp (release number or SHA1)
So i am dowloading via nuget LibGit2Sharp prerelease in my paket.dependencies, which resolves to
LibGit2Sharp (0.26.0-preview-0027)
LibGit2Sharp.NativeBinaries (1.0.226) - restriction: >= netstandard2.0
Operating system(s) tested; .NET runtime tested
this is on Server 2016 with net471 which should behave like windows 10.
- 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
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de libgit2/libgit2sharp
-
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
libgit2/libgit2sharp#2193 · 2 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
libgit2/libgit2sharp#2192 · 1 commentaire ·
-
Website is down Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
libgit2/libgit2sharp#2191 · 2 réactions ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
libgit2/libgit2sharp#2189 · 1 réaction ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
libgit2/libgit2sharp#2187 · 2 commentaires ·
Toutes les issues de libgit2/libgit2sharp
Issues similaires
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
azurenoops/spin_agent#975 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulté 2/5 1-3 heures Accessibilité débutants 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
SubtitleEdit/subtitleedit#15108 · 1 commentaire ·