Contents
Log in to Azure
I used the Developer Powershell 7 terminal in Visual Studio to login to our Azure account (keyboard shortcut Ctrl and ' ):
az login
After logging in via the browser window that was launched by that command, I am informed of my user account details:
Create the App Service
I already had an existing resource group and service plan in our Azure account for hosting the web app in Azure App Services.
This allowed me to create the web api app using the following command
az webapp create --name MyWebApiApp --resource-group MyRG --plan MySP
Create the Publish Profile
From the Build menu, select Publish MyWebApiApp.
If the menu option is a greyed out “Publish Selection”, check that you are currently viewing a file belonging to the MyWebApiApp project - you could possibly be viewing a file from your unit test project for example.