Azure Deployment Failed with following error

Maksim Troitski 21 Reputation points
2020-11-18T09:08:37.717+00:00

I created a new solution with SDK 5.0 with default controller WeatherForecastController on mac. Then created a new resource "Web App + MySQL" and deployed the solution in "App Service". Deployment fails with following output:

> Command: "D:\home\site\deployments\tools\deploy.cmd"
> '"\MSBuild.exe"' is not recognized as an internal or external command,
> operable program or batch file.
> Handling ASP.NET Core Web Application deployment with MSBuild16.7.0.
> Failed exitCode=1, command="\MSBuild.exe" /restore "D:\home\site\repository\Web\Web.csproj" /p:DeployOnBuild=true /p:configuration=Release /p:publishurl="D:\local\Temp\8d88b9896af75a9"
> An error has occurred during web site deployment.
> '"\MSBuild.exe"' is not recognized as an internal or external command,\r\noperable program or batch file.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\90.21106.4900\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

Why it happens and how to fix?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,756 questions
{count} votes

Accepted answer
  1. Jinn Studios 101 Reputation points
    2020-11-21T01:42:41.793+00:00

    For your Web App you should check out Configuration > General settings > .NET Framework version. By default due to habit or templating, it was set to .NET 4.8. I changed it to "Early Access" .NET 5.0 and was able to move to the next issue, lol.

    5 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.