【发布时间】:2018-06-28 15:49:47
【问题描述】:
我将我的 Web 应用程序升级到最新的 Asp.net Core 2.1.1,然后直接从 GitHub 将其推送到 Azure 应用程序服务。当我访问我的网站时,我得到了 500,并且日志显示以下内容
System.BadImageFormatException: 在 System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(System.Private.CoreLib,版本=4.0.0.0,文化=中性,PublicKeyToken=7cec85d7bea7798e) 在 System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(System.Private.CoreLib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e)
异常本身的docs是说“当动态链接库(DLL)或可执行程序的文件映像无效时引发的异常。”,而others mentioned是因为Azure使用x86 .net 核心版本。
无论哪种方式,我都无法弄清楚我究竟需要做什么来解决这个问题。感谢您对此提供的任何帮助。
【问题讨论】:
标签: azure asp.net-core badimageformatexception