Search⌘ K
AI Features

Publishing and Web Deploy

Explore how to publish ASP.NET Core MVC applications using Visual Studio and the .NET SDK's publish command. Learn to create and use publish profiles, deploy to local folders, FTP, IIS Web Deploy, and Azure Web Apps. Understand how Web Deploy supports application and database updates in a streamlined process.

A web application can be published to various targets and in several ways. Among them, to a target Web Server through FTP or other protocols, or to a local folder from where it can be moved manually to its target location. The ASP.NET Core software development kit offers a unique, powerful publish command that unifies all types of publications into a unique simple experience.

.NET publish command

All publication types supported by the .NET SDK can be executed with the command below. This must be launched from within the Web project folder:

dotnet publish -p:PublishProfile=MyPublishProfile

Where MyPublishProfile.pubxml is an XML file containing all publish options. Similar files called publish profiles are placed in the Properties/PublishProfiles project folder, as shown below:

Properties
  PublishProfiles
    MyPublishProfile.pubxml 
...