Reputation: 21
I wrote an application that work with Git using the library LibGit2Sharp, everything works properly. After finishing development, we publish to a common folder from which everyone works. I want to create an installation for the application and that everyone will install it.
To create an installation for the application, I added a new Setup Project to Solution and referenced all the projects in Solution to it. I installed the app and it runs, but crashes when trying to work with Git.
The error I get: DllNotFoundException: Unable to load DLL 'git2-106a5f2' or one of its dependencies: The specified module could not be found.
The point is that the Dll file described exists in the installation folder as it exists in the Publish folder.
Is there anything I should have taken into account during the installation process? what am I missing?
Upvotes: 0
Views: 286
Reputation: 26
This indicates that it cannot find the NativeBinaries Package
As you have indicated that this DLL is in the installer, then you may need to set the GlobalSettings.NativeLibraryPath to the appropriate location.
Upvotes: 0
Reputation: 174
This error can occur if the required dependencies of the "git2-106a5f2" DLL are not installed or are not located in the PATH. If the necessary dependencies are installed and found in the PATH, you may check for them. If not, you may do so when installing by adding them to the PATH.
Another choice is to deliver your program along with the installation package that contains the necessary dependencies. By doing this, regardless of the user's environment, you can make sure that your application always has access to the necessary dependencies.
Make sure you are using the appropriate version of the "git2-106a5f2" DLL for your program by checking to see if it is an x86 or x64 DLL. Use the x86 version of the DLL if your program was created for that architecture, and the x64 version if it was.
Upvotes: 0