Azure App Service中的LibGit2Sharp抛出异常

问题描述 投票:0回答:1

我有一个.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

此代码在本地可以正常工作,所以我无法弄清楚出了什么问题。

c# azure libgit2sharp azure-web-app-service azure-app-service-plans
1个回答
0
投票

我遇到了相同的问题(使用DOTNET 4.7.2),关于此问题的结论是什么?

© www.soinside.com 2019 - 2024. All rights reserved.