I have a .NET 4.6 web app running in an Azure App Service in 64 bit. When I hit a controller that calls LibGit2Sharp, I get the following exception:
[BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)]
And this is the stack trace:
LibGit2Sharp.Core.NativeMethods.git_repository_new(git_repository*& repo):-1
LibGit2Sharp.Core.Proxy.git_repository_new() in c:\Git\LibGit2Sharp-2\LibGit2Sharp\Core\Proxy.cs:2553
LibGit2Sharp.Repository.ListRemoteReferences(String url, CredentialsHandler credentialsProvider) in c:\Git\LibGit2Sharp-2\LibGit2Sharp\Repository.cs:633
This code works fine locally, so I just can't figure out what's going wrong.
User contributions licensed under CC BY-SA 3.0