【问题标题】:The specified framework 'Microsoft.AspNetCore.App', version '2.2.5' was not found找不到指定的框架“Microsoft.AspNetCore.App”,版本“2.2.5”
【发布时间】:2019-10-06 11:04:53
【问题描述】:

将我的 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

如何解决此问题?

【问题讨论】:

    标签: .net asp.net-core .net-core asp.net-core-2.1 netcoreapp2.1


    【解决方案1】:

    查看错误,似乎尚未在 Azure Web 应用程序实例上安装 ASP.NET Core 2.2.5。您必须等待或明确指定要使用的运行时版本,而不是 SDK 选择最新版本:

    <PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.4" />
    

    更新项目文件后,您必须重新发布您的应用程序。

    【讨论】:

      猜你喜欢
      • 2018-11-08
      • 2018-11-26
      • 2020-08-24
      • 2021-03-22
      • 2022-08-17
      • 1970-01-01
      • 1970-01-01
      • 2021-07-09
      • 1970-01-01
      相关资源
      最近更新 更多