我有一个64位的Azure应用服务中运行的.NET 4.6 Web应用程序。当我点击一个调用LibGit2Sharp的控制器时,我得到以下异常:
[BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)]
这是堆栈跟踪:
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
此代码在本地运行良好,所以我无法弄清楚出了什么问题。