data/authors/Paul Logan.json

Add new Web API project in Visual Studio

Contents

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:

Login to Azure
Login to Azure

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
Creating the web app using PowerShell
Creating the web app using PowerShell

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.

Setting up the publish profile - step 1
Setting up the publish profile - step 1
Setting up the publish profile - step 2
Setting up the publish profile - step 2
Setting up the publish profile - step 3
Setting up the publish profile - step 3
Setting up the publish profile - step 4
Setting up the publish profile - step 4
Setting up the publish profile - step 5
Setting up the publish profile - step 5
Setting up the publish profile - step 6
Setting up the publish profile - step 6
Setting up the publish profile - step 7
Setting up the publish profile - step 7
Setting up the publish profile - step 8
Setting up the publish profile - step 8
Setting up the publish profile - step 9
Setting up the publish profile - step 9