Publishing the ASP.NET Core Backend to Azure

Learn to publish an ASP.NET project to Azure.

In this section, we are going to deploy our database and backend API to Azure using Visual Studio. We will create publish profiles for deployment to a production environment as well as a staging environment. During the process of creating the profiles, we will create the required Azure app services and SQL databases. At the end of this section, we will have two profiles that we can use to quickly deploy to our staging and production environments.

Publishing to production

Let's carry out the following steps to create a production deployment profile and use it to deploy our backend to production:

  1. In “Solution Explorer”, right-click the “QandAproject and select “Publish...”.

  2. The “Publish” dialog opens, which asks us to choose a publish target. Choose “Azure” and click “Next,” as illustrated in the following screenshot:

Get hands-on with 1400+ tech skills courses.