[英]The specified framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found. - Azure App Service on Linux
I have an app running in Azure App Service on Linux and decided to upgrade the app from .NET Core 2.1 to .NET Core 2.2. 我有一个在Linux上的Azure App Service中运行的应用程序 ,决定将其从.NET Core 2.1升级到.NET Core 2.2。 It is modeled after a
.NET Core 2.2
dotnet new angular
template. 它以
.NET Core 2.2
dotnet new angular
模板为模型。
My app builds in Azure DevOps using the Azure Web App for ASP.NET
template and its defaults plus the following updates to the Azure App Service Deploy
task: 我的应用程序使用
Azure Web App for ASP.NET
的Azure Web App for ASP.NET
模板及其默认设置以及Azure App Service Deploy
任务的以下更新在Azure DevOps中构建:
App Service type : Azure Web App for Linux 应用程序服务类型 :适用于Linux的Azure Web应用程序
Runtime Stack : .NET Core 2.2 运行时堆栈 :.NET Core 2.2
Startup command : dotnet MyAppName.dll 启动命令 :dotnet MyAppName.dll
This task deploys the app successfully and I confirm the deployed contents through FTP. 此任务成功部署了应用程序,我通过FTP确认了已部署的内容。
Starting and navigating to the app shows this page: 启动并导航到该应用程序将显示以下页面:
Locally, my app runs successfully in Debug and Release modes in Visual Studio 2017. It will also work if I host the contents of a dotnet publish -c Release
command locally. 在本地,我的应用程序在Visual Studio 2017的调试和发布模式下成功运行。如果我在本地托管
dotnet publish -c Release
命令的内容,它也将起作用。
I enabled logs using Monitoring > Diagnostics logs in the Azure portal and found this message in the file 2019_02_14_RD00155D99205C_default_docker.log
: 我在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'.
I have not found any other clues. 我没有发现其他线索。 Does this imply that the default image Azure provides is not correct when setting Runtime Stack to .NET Core 2.2?
将运行时堆栈设置为.NET Core 2.2时,这是否意味着Azure提供的默认映像不正确?
Update Found this link which mentions that 2.2 on Linux is being "rolled out" as of 02/12/2019. 更新找到此链接 ,其中提到从2019年12月12日开始“推出” Linux 2.2。 Perhaps this means that a correct image is not deployed yet where my App Service is located (US East).
也许这意味着我的应用程序服务所在的位置(美国东部)尚未部署正确的映像。 Assuming that is what is going on, adding a new non-working 2.2 option to the Azure Portal and Azure DevOps UI is a poor user experience.
假设正在发生这种情况,则向Azure门户和Azure DevOps UI添加新的无法正常工作的2.2选项会带来糟糕的用户体验。
I tested again today and am able to deploy a .NET Core 2.2 Linux app. 我今天再次进行了测试,并且能够部署.NET Core 2.2 Linux应用程序。 Most likely this started working February 26, 2018, judging by the latest edit on this Github issue .
从有关此Github问题的最新编辑来看,这很可能于2018年2月26日开始生效 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.