Profile picture
A web developer's blog
September 21, 2021
Deploying a .NET 6 web application to Azure from Visual Studio 2022

Prerequisites

Steps

Right-click your backend project, hit Publish… 1

Choose Azure in the Target step 2

Let’s go with Azure App Service here 3

Create a Resource Group and a Hosting Plan here, if you don’t have them already. 4

Let’s just skip the API Management part 5

Choose the first option here — Publish. 6

Almost there… Change Deployment Mode from “Framework-dependent” to “Self-contained” 7

Now hit Publish, and wait for it to do its thing: 8

Good, let’s see if that worked. Open your browser and check that the /weatherforecast endpoint is working. You should see something like this: 9

Yay! Your backend is now up and running in Azure!