简体   繁体   English

Azure 应用服务 - 更新 .NET Core 运行时

[英]Azure App Service - update .NET Core runtime

I have an App Service on Azure Cloud for my .NET Core Web application.我的 .NET Core Web 应用程序在 Azure Cloud 上有一个应用服务。 I decided to update my solution to .NET Core SDK to version 2.1.101 with runtime in version 2.0.6.我决定将我的 .NET Core SDK 解决方案更新到版本 2.1.101,运行时版本为 2.0.6。 When I try to start my application on Azure App Service, I get error which tells me that I can not run my application because of missing runtime in version 2.0.6.当我尝试在 Azure 应用服务上启动我的应用程序时,我收到错误消息,告诉我由于在 2.0.6 版中缺少运行时而无法运行我的应用程序。 The highest installed version on Azure is 2.0.5. Azure 上安装的最高版本是 2.0.5。

The question is how can I install the newest version of .NET Core SDK (2.1.101)?问题是如何安装最新版本的 .NET Core SDK (2.1.101)?

I tried with Site Extensions (Kudu) and run PowerShell scripts, but nothing works for me.我尝试使用站点扩展 (Kudu) 并运行 PowerShell 脚本,但对我来说没有任何效果。

Based on my test, currently the installed version on Azure is 2.0.6 .根据我的测试,目前 Azure 上安装的版本是 2.0.6 You can verify this by going to the Console and running 'dotnet –info'.您可以通过转到控制台并运行“dotnet –info”来验证这一点。 It should look like this:它应该是这样的:

在此处输入图片说明

We could also update the .NET Core runtime with Azure App Service site extension我们还可以使用Azure 应用服务站点扩展更新 .NET Core 运行时

在此处输入图片说明

In your case, if you publish it with VS,I recommond that you could check the [Remove additional files at destination] button during republish.在您的情况下,如果您使用 VS 发布它,我建议您可以在重新发布期间选中 [Remove additional files at destination] 按钮。 That will remove the files existing in the WebApp before upload the files.这将在上传文件之前删除 WebApp 中现有的文件。

在此处输入图片说明

You can change NetCore Runtime on Configuration -> General settings -> Major version = [Select Net code version] and Save Changes.您可以在配置 -> 常规设置 -> 主要版本 = [选择网络代码版本] 并保存更改上更改 NetCore 运行时。

You can check the net core version on Development Tools -> SSH.您可以在开发工具 -> SSH 上检查网络核心版本。 Though there is no dotnetsdk so dotnet --info won't run.虽然没有 dotnetsdk,所以 dotnet --info 不会运行。

在此处输入图片说明

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

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