Azure 应用服务配置歧义
Azure app service Configuration ambiguity
我已经使用 VS 2019 发布上传了一个 asp.net 核心应用程序,并针对该应用程序 netcoreapp2.2
。
该应用程序运行良好,但在检查一些性能问题时,我注意到在 Azure 门户-配置-常规设置中,应用程序堆栈设置为 .NET
(不是 .net 核心),版本为 V4.7。
这提出了 2 个问题:
1. 它是如何工作的...?
2. 为什么 VS 部署过程没有配置发布部分显示的设置?
VS 发布设置:
Azure 设置:
谢谢!
ASP.NET Core 2.x 可以面向 .NET Core 或 .NET Framework。 ASP.NET 以 .NET Framework 为目标的核心应用不是跨平台的——它们 运行 仅在 Windows 上。通常,ASP.NET Core 2.x 由 .NET Standard 库组成。在任何实现 .NET Standard 2.0 的 .NET 平台上使用 .NET Standard 2.0 运行 编写的库。
当您发布到 .NET Core 2.2 运行time 应用程序时,您总是会收到以下警告消息:
"There was a problem starting MyProjectName on MyWebAppServiceName. Your application requires the .NET Core 2.2.0 runtime, but Microsoft Azure App Service only support the following versions:.
解决此问题的一种方法是在发布设置中将部署模式更改为self-contained
,这将允许应用程序携带自己的运行时间."
参考这个类似case.
编辑:
当您在门户网站上创建 webapp 时,您可以转到 arm 模板获取设置为 CurrentStack: dotnetCore
的堆栈设置。但是当你在 VS 上发布项目时,它可以净设置 运行 时间。
因此,这可能是一个 VS 问题,您可以提供反馈,或者您可以先在 Azure 上创建 webapp,将 运行time 设置为 .Net Core 并使用 VS 将项目发布到它。
我通过更新 .sln 中的以下行解决了这个问题
来自:
Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
收件人:
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
我已经使用 VS 2019 发布上传了一个 asp.net 核心应用程序,并针对该应用程序 netcoreapp2.2
。
该应用程序运行良好,但在检查一些性能问题时,我注意到在 Azure 门户-配置-常规设置中,应用程序堆栈设置为 .NET
(不是 .net 核心),版本为 V4.7。
这提出了 2 个问题:
1. 它是如何工作的...?
2. 为什么 VS 部署过程没有配置发布部分显示的设置?
VS 发布设置:
Azure 设置:
谢谢!
ASP.NET Core 2.x 可以面向 .NET Core 或 .NET Framework。 ASP.NET 以 .NET Framework 为目标的核心应用不是跨平台的——它们 运行 仅在 Windows 上。通常,ASP.NET Core 2.x 由 .NET Standard 库组成。在任何实现 .NET Standard 2.0 的 .NET 平台上使用 .NET Standard 2.0 运行 编写的库。
当您发布到 .NET Core 2.2 运行time 应用程序时,您总是会收到以下警告消息:
"There was a problem starting MyProjectName on MyWebAppServiceName. Your application requires the .NET Core 2.2.0 runtime, but Microsoft Azure App Service only support the following versions:.
解决此问题的一种方法是在发布设置中将部署模式更改为self-contained
,这将允许应用程序携带自己的运行时间."
参考这个类似case.
编辑:
当您在门户网站上创建 webapp 时,您可以转到 arm 模板获取设置为 CurrentStack: dotnetCore
的堆栈设置。但是当你在 VS 上发布项目时,它可以净设置 运行 时间。
因此,这可能是一个 VS 问题,您可以提供反馈,或者您可以先在 Azure 上创建 webapp,将 运行time 设置为 .Net Core 并使用 VS 将项目发布到它。
我通过更新 .sln 中的以下行解决了这个问题 来自:
Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
收件人:
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22