Saturday, November 21, 2020

Create .NET 5 Early Access Web App in Azure Using CLI

 

.NET 5 is the latest framework introduced by Microsoft recently and Azure Apps Service support also released at the same time which is good news for .NET developers targeting the applications to run on Azure platform. However, there are few limitations in trying to automate the Infra deployment for .NET 5 early access Web App services in Azure. Famous Infra deployment technologies such as Terraform and Pulumi are yet to support .NET 5 app service automation. Further, Azure Cloud shell also has limited control on this latest feature as Azure CLI is not yet updated. As a solution, this blog explains how to deploy .NET early access infra using specific version of Azure CLI. 

As the first step, get verified the latest CLI version(2.15.1) installed in your working machine. You can use following command to get the current CLI version. 

az --version



After verifying the version, you can use following command to see the supported run times

az webapp list-runtimes


Now you can use following command to deploy .NET 5 early access web app in Azure. Provide resource group, plan name, app service name and run time with the command. Other than these values "--%" used to avoid the command failure due to the | symbol in the runtime specification.

az webapp create -g rg-githubact-demo -p plan-githubact-demo -n app-mynet5-demo --% --runtime "DOTNET|5.0"



Once deployment is completed, go to Azure portal and you would be able to see the deployed early access  app service.


 This blog explained how to deploy the .NET early access app service using Azure CLI version 2.15.1.

No comments:

Post a Comment