如何将asp.net Core 3.1部署到Azure

问题描述 投票:1回答:1

我有一个小的ASP.NET Core 3.1控制台应用程序,我想将其部署到Azure。当我运行此deploy命令时:

git push azure master

我得到以下输出:

........

........

remote: Running deployment command...
remote: Handling .NET Console Application deployment with dotnet.exe.
remote: D:\Program Files (x86)\dotnet\sdk\2.2.109\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1.  Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.1. [D:\home\site\repository\ConsoleApp.csproj]
remote: Failed exitCode=1, command=dotnet restore "D:\home\site\repository\ServiceBusWriter.sln"
remote: An error has occurred during web site deployment.
remote:
remote: Error - Changes committed to remote repository but deployment to website failed.
To https://ServicebusToSQL.scm.azurewebsites.net/ServicebusToSQL.git
 * [new branch]      master -> master

从我收集的此输出中,远程Azure部署环境必须(显然)也必须是.NET Core 3.1。>

什么是适当的推荐或操作,它们将迫使Azure远程成为.NET Core 3.1?

我有一个小的ASP.NET Core 3.1控制台应用程序,我想将其部署到Azure。当我运行以下部署命令:git push azure master时,我得到以下输出:........ ........ remote:Running ...

azure asp.net-core azure-deployment
1个回答
1
投票

Azure应用程序服务并非在所有地区都支持开箱即用的.NET Core 3.1。因此,如果要使用.NET Core 3.1,则需要启用.NET Core 3.1 SDK扩展。

© www.soinside.com 2019 - 2024. All rights reserved.