Google.OrTools.dll 无法在 windows 容器中工作

Google.OrTools.dll not working in windows container

Google.OrTools 在我们的应用程序中使用。当我们将它部署在 windows 容器的 microsoft/iis 图像中时,我们得到以下异常:

无法加载文件或程序集 'file:///C:\NGECatCalcAPIServices\RulesDll\v3.0.2.7\Google.OrTools.dll' 或其依赖项之一。尝试加载格式不正确的程序。--- 在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName、String codeBase、Evidence assemblySecurity、RuntimeAssembly locationHint、StackCrawlMark& stackMark、IntPtr pPrivHostBinder、Boolean throwOnFileNotFound、Boolean forIntrospection、Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName、String codeBase、Evidence assemblySecurity、RuntimeAssembly locationHint、StackCrawlMark& stackMark、IntPtr pPrivHostBinder、Boolean throwOnFileNotFound、Boolean forIntrospection、Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef、Evidence assemblySecurity、RuntimeAssembly reqAssembly、StackCrawlMark 和 stackMark、IntPtr pPrivHostBinder、布尔值 throwOnFileNotFound、布尔值 forIntrospection、布尔值 suppressSecurityChecks) 在 System.Reflection.Assembly.Load(AssemblyName assemblyRef)

我们还安装了VC++运行时版本2017。然后我们尝试部署最新的Google.OrTools.dll (v6.10)。但仍然出现相同的异常。

有没有人遇到过这种情况。如果是怎么解决的?

在这方面的任何帮助将不胜感激。

你能检查一下 IIS 容器是 64 位的吗?

我们必须复制所有名称以 msvcr 和 msvcs 开头的 dll,它们存在于 c:\windows\system32 和 c:\windows\syswow64 文件夹