0

我有一个 .NET 4.6 Web 应用程序在 64 位的 Azure 应用程序服务中运行。当我点击一个调用 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

这段代码在本地运行良好,所以我不知道出了什么问题。

4

0 回答 0