Google OR-Tools HRESULT:Windows Server 2012 R2上的0x8007007E

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

我创建了一个使用Google OR-Tools库for Net的Windows服务应用程序。我在本地开发环境 - Windows 10(x64)上成功测试了它。

但是,当我将该应用程序移动到Windows Server 2012 R2时,它会抛出以下错误:

Knihovnu DLL Google.OrTools.runtime.win-x64.dll nelze načíst: Uvedený modul nebyl nalezen. (Výjimka na základě hodnoty HRESULT: 0x8007007E)
Inicializační metoda typu SWIGExceptionHelper vyvolala výjimku.
Inicializační metoda typu Google.OrTools.Sat.operations_research_satPINVOKE vyvolala výjimku.

这是捷克语,但我认为重要的是HRESULT:0x8007007E

我根据关于SO的另一个问题尝试了跟随:

  • 检查,OR-tools库在应用程序目录中
  • 将应用程序目录添加到PATH变量
c# windows-server-2012-r2 or-tools
1个回答
0
投票

解决方案是从这里安装Microsoft Visual C ++ Redistributable for Visual Studio:https://support.microsoft.com/cs-cz/help/2977003/the-latest-supported-visual-c-downloads

与用于编译的Visual Studio版本匹配的版本(根据https://github.com/google/or-tools/issues/35

如需进一步参考,请参阅此SO:Unable to load DLL (Module could not be found HRESULT: 0x8007007E)

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