在将我的web应用的targetFramework从netcoreapp2.1升级到netcoreapp2.2之后,我的web应用在本地机器上工作得很好,但是当发布到Azure时,WebApp环境无法启动,并出现以下错误:
HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
Common causes of this issue:
The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=808681如果我转到Azure控制台,尝试使用dotnet xxx.dll手动运行应用程序,我会收到以下错误:

添加了我对Microsoft.AspNetCore.App的引用,但没有添加警告所建议的版本:
<PackageReference Include="Microsoft.AspNetCore.App" />我在以前的版本更新中发现了类似的问题,但对我没有任何帮助:https://github.com/aspnet/AspNetCore.Docs/issues/8794
如何解决此问题?
发布于 2019-05-20 15:23:48
查看该错误,似乎Azure核心2.2.5尚未安装在ASP.NET web应用程序实例上。您必须等待或显式指定要使用的运行时版本,而不是SDK选择最新版本:
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.4" />更新项目文件后,必须重新发布应用程序。
https://stackoverflow.com/questions/56214801
复制相似问题