Overview of Publish

For ASP.NET, .NET Core, and Python apps, you can use the Publish tool to deploy your applications.

What is Publish?

The Publish tool helps you deploy your application to various destinations. Get started by right-clicking your project in Solution Explorer and selecting Publish from the context menu.

How does it work?

Publish uses profiles (.pubxml files) to allow for multiple project configurations and multiple publish targets for a single project.

publish profiles

The contents of the profile are XML and based on MSBuild.

publish profile example contents

The Publish profile keeps credentials in a separate, hidden by default file that doesn’t get checked-in.

hidden user files

You can always import publish profiles from IIS and Azure App Service

import profile

Visual Studio can help you manage dependencies to Azure services

When you use the Publish tool to deploy your application to Azure, you get the opportunity to configure dependencies to Azure services.

dependencies during publish

The idea is that you may want to connect to a different SQL database or a different Storage account or a different Key Vault for different environments like testing, QA, pre-prod, and so forth.

Next steps

For the Publish tool: