I upgraded Microsoft.AspNetCore from 2.0.3 to 2.0.5 and my WebAPI project, although running successfully locally, fails to start in production (IIS). Everything was fine in production until this upgrade. The error message produced in the log directory is as follows:
-
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
Could someone explain to me the details of exactly what this means? I assume it's a version mismatch of sorts, but why is this occurring? I thought the latest stable releases of NuGet packages weren't supposed to have such issues.
I was able to resolve the issue by downgrading Microsoft.AspNetCore.All from 2.0.5 to 2.0.3, but would like to find a better solution to the issue so I can use the most up-to-date version of this package.
本文解决了将.NET Core应用从2.0.3升级到2.0.5后,在Linux环境下部署时遇到的依赖项丢失问题。通过调整项目配置文件,确保了应用能够在生产环境中正确启动。
1338

被折叠的 条评论
为什么被折叠?



