带有.NET Core 3.0的Azure Web应用程序失败:找不到Microsoft.AspNetCore.App [英] Azure web app with .NET Core 3.0 fails: Can't find Microsoft.AspNetCore.App

查看:116
本文介绍了带有.NET Core 3.0的Azure Web应用程序失败:找不到Microsoft.AspNetCore.App的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试在升级到.NET Core 3.0后部署我们的Web应用程序,但是它始终显示服务不可用"消息.如果我们尝试从Kudu( dotnet webapp.dll )运行 dotnet ,则会出现以下错误:

We are trying to deploy our web app after upgrading to .NET Core 3.0, but it keeps getting the "service unavailable" message. If we try to run dotnet from Kudu (dotnet webapp.dll) we get the following error:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '3.0.0' was not found.
  - The following frameworks were found:
      2.1.10 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.1.12 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.1.13 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.5 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.6 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.7 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The .NET Core frameworks can be found at:
  - https://aka.ms/dotnet-download

我们尝试使用

We tried to install .NET Core 3.0 with Microsoft's guide for Azure, but with no success.

有什么建议吗?

推荐答案

我们遇到了完全相同的问题.Azure应用服务当前不支持Net Core 3.

We had exactly the same problem. Azure App Service does not currently support Net Core 3.

临时的解决方法是通过发布工具从Visual Studio构建一个自包含的应用程序.您可以在发布设置中将其从依赖于框架"更改为自包含".只需将其部署到Azure.

The temporary workaround is to build a self contained app from Visual Studio through the publish tool. You can change it from Framework Dependent to Self Contained in the publishing settings. Simply deploy that to Azure.

我们还尝试使用DevOps管道来执行此操作,但无法解决如何进行自包含构建的问题,并且由于Azure希望很快会支持Net Core 3,因此该发布现在可以正常工作.

We also tried to use our DevOps pipelines to do this, but couldn't work out how to do a self contained build and as Azure will hopefully support Net Core 3 soon, the publish works fine for now.

希望有帮助:)

这篇关于带有.NET Core 3.0的Azure Web应用程序失败:找不到Microsoft.AspNetCore.App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆