我将Microsoft.AspNetCore从2.0.3升级到2.0.5,我的WebAPI项目在本地成功运行,但在生产环境(IIS)中无法启动。在此升级之前,生产环境一切都很好。日志目录中产生的错误消息如下:
Error:
An assembly specified in the application dependencies manifest (MyProject.WebAPI.deps.json) was not found:
package: 'Microsoft.AspNetCore.Mvc.Abstractions', version: '2.0.2'
path: 'lib/netstandard2.0/Microsoft.AspNetCore.Mvc.Abstractions.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.5.xml
有人能向我解释一下这意味着什么吗?我猜这是某种版本不匹配的问题,但为什么会发生这种情况呢?我以为最新的 NuGet 包的稳定版本不应该有这样的问题。
我通过将 Microsoft.AspNetCore.All 从 2.0.5 降级到 2.0.3 来解决了这个问题,但希望找到一个更好的解决方案,以便我可以使用此软件包的最新版本。