繁体   English   中英

找不到指定的框架'Microsoft.AspNetCore.App'版本'2.2.0'。 -Linux上的Azure应用服务

[英]The specified framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found. - Azure App Service on Linux

我有一个在Linux上的Azure App Service中运行的应用程序 ,决定将其从.NET Core 2.1升级到.NET Core 2.2。 它以.NET Core 2.2 dotnet new angular模板为模型。

我的应用程序使用Azure Web App for ASP.NETAzure Web App for ASP.NET模板及其默认设置以及Azure App Service Deploy任务的以下更新在Azure DevOps中构建:


应用程序服务类型 :适用于Linux的Azure Web应用程序

运行时堆栈 :.NET Core 2.2

启动命令 :dotnet MyAppName.dll


此任务成功部署了应用程序,我通过FTP确认了已部署的内容。

启动并导航到该应用程序将显示以下页面:

在此处输入图片说明

在本地,我的应用程序在Visual Studio 2017的调试和发布模式下成功运行。如果我在本地托管dotnet publish -c Release命令的内容,它也将起作用。

我在Azure门户中使用监视>诊断日志启用了日志,并在文件2019_02_14_RD00155D99205C_default_docker.log找到了此消息:

2019-02-14T19:52:29.377625884Z   _____                               
2019-02-14T19:52:29.377672685Z   /  _  \ __________ _________   ____  
2019-02-14T19:52:29.377679386Z  /  /_\  \___   /  |  \_  __ \_/ __ \ 
2019-02-14T19:52:29.377684186Z /    |    \/    /|  |  /|  | \/\  ___/ 
2019-02-14T19:52:29.377688886Z \____|__  /_____ \____/ |__|    \___  >
2019-02-14T19:52:29.377693986Z         \/      \/                  \/ 
2019-02-14T19:52:29.377698686Z A P P   S E R V I C E   O N   L I N U X
2019-02-14T19:52:29.377703186Z 
2019-02-14T19:52:29.377707486Z Documentation: http://aka.ms/webapp-linux
2019-02-14T19:52:29.377711986Z Dotnet quickstart: https://aka.ms/dotnet-qs
2019-02-14T19:52:29.377716587Z 
2019-02-14T19:52:29.956004709Z Starting OpenBSD Secure Shell server: sshd.
2019-02-14T19:52:30.234443169Z The specified framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found.
2019-02-14T19:52:30.234492570Z   - Check application dependencies and target a framework version installed at:
2019-02-14T19:52:30.234498570Z       /usr/share/dotnet/shared/Microsoft.AspNetCore.App
2019-02-14T19:52:30.234615073Z   - Alternatively, install the framework version '2.2.0'.

我没有发现其他线索。 将运行时堆栈设置为.NET Core 2.2时,这是否意味着Azure提供的默认映像不正确?


更新找到此链接 ,其中提到从2019年12月12日开始“推出” Linux 2.2。 也许这意味着我的应用程序服务所在的位置(美国东部)尚未部署正确的映像。 假设正在发生这种情况,则向Azure门户和Azure DevOps UI添加新的无法正常工作的2.2选项会带来糟糕的用户体验。

我今天再次进行了测试,并且能够部署.NET Core 2.2 Linux应用程序。 从有关此Github问题的最新编辑来看,这很可能于2018年2月26日开始生效

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM