Publish a Web app to Azure App Service using Visual Studio
For ASP.NET, ASP.NET Core, Node.js, and .NET Core apps, publish to Azure App Service or Azure App Service Linux (using containers) using one of the following methods.
For continuous (or automated) deployment of apps, use Azure DevOps with Azure Pipelines.
For one-time (or manual) deployment of apps, use the Publish tool in Visual Studio to deploy ASP.NET, ASP.NET Core, Node.js, and .NET Core apps to Azure App Service or App Service for Linux (using containers). For Python apps, follow the steps on Python - Publish to Azure App Service.
This article describes how to use the Publish tool for one-time deployment.
Visual Studio 2017 installed with the appropriate workloads for your language of choice:
- ASP.NET: ASP.NET and web development
- Node.js: Node.js development
An Azure subscription. If you do not already have subscription, sign up for free, which includes $200 in credit for 30 days and 12 months of popular free services.
An ASP.NET, ASP.NET Core, .NET Core, or Node.js project. If you don't already have a project, select an option below:
- ASP.NET Core: Follow Quickstart: Use Visual Studio to create your first ASP.NET Core web app, or use File > New Project, select Visual C# > .NET Core, then select ASP.NET Core Web Application. When prompted, select the Web Application (Model-View-Controller) template, make sure that No Authentication is selected, and then select OK.
Make sure you build the project using the Build > Build Solution menu command before following the deployment steps.
Publish to Azure App Service
In Solution Explorer, right-click the project and choose Publish (or use the Build > Publish menu item).
If you have previously configured any publishing profiles, the Publish pane appears, in which case select Create new profile.
In the Pick a publish target dialog box, choose App Service.
Select Publish. The Create App Service dialog box appears. Sign in with you Azure account, if necessary, then the default app service settings populate the fields.
Select Create. Visual Studio deploys the app to your Azure App Service, and the web app loads in your browser. The project properties Publish pane shows the site URL and other details.
Clean up resources
In the preceding steps, you created Azure resources in a resource group. If you don't expect to need these resources in the future, you can delete them by deleting the resource group. From the left menu in the Azure portal, select Resource groups and then select myResourceGroup. On the resource group page, make sure that the listed resources are the ones you want to delete. Select Delete, type myResourceGroup in the text box, and then select Delete.
In this quickstart, you learned how to use Visual Studio to create a publishing profile for deployment to Azure. You can also configure a publishing profile by importing publish settings from Azure App Service.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.