Unable to load DLL 'git2-106a5f2'
See original GitHub issueReproduction steps
- Open .NET Framework 4.6 project
- Install LibGit2Sharp.NativeBinaries v2.0.312 NuGet package.
- Install LibGit2Sharp v0.26.2 NuGet Package.
- In a .cs file, insert
Repository repo = new Repository();
Expected behavior
Works.
Actual behavior
System.TypeInitializationException Message=The type initializer for ‘LibGit2Sharp.Core.NativeMethods’ threw an exception. Inner Exception 1: DllNotFoundException: Unable to load DLL ‘git2-106a5f2’: The specified module could not be found.
Version of LibGit2Sharp (release number or SHA1)
v0.26.2
Operating system(s) tested; .NET runtime tested
Windows 10, .NET Framework 4.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Unable to load DLL 'git2-106a5f2' - Stack Overflow
The native DLL is part of the LibGit2Sharp.NativeBinaries project that LibGit2Sharp takes a dependency on. It should be installed (transitively) ...
Read more >Exception "Unable to load DLL 'git2-381caf5" while using ...
LibGit2Sharp 0.23.0 is marked as having dependency toward LibGit2Sharp.NativeBinaries (= 1.0.163) While updating Git Diff Margin to ...
Read more >How to Fix Unable to Load DLL/Error ...
About the Unable to Load DLL Error; Method 1: Reinstall the Program; Method 2: Disable the Auto-Startup of the Program; Method 3: Clean...
Read more >[Solved] Unable to Load .dll file
Hi all, I am trying to use libzplay.dll in my project but I got an error message when add Reference to this dll...
Read more >'Unable to load DLL 'UnManaged.dll': The specified module ...
I am developing a Visual C# Desktop Application in Visual Studio 2017. I have a third party unmanaged DLL which I have to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jjhayworth LibGit2Sharp requires specific versions of the LibGit2Sharp.NativeBinaries package, which is why its shipped with the package version locked.
The 0.26.2 package requires you to use LibGit2Sharp.NativeBinaries 2.0.306 only. You should be getting a warning or error in your project to even have a newer version installed.
If this only happens with release and when you try to run the exe elsewhere, check that the lib folder is beside it. lib contains the various versions of git2 dll.