Automate deployment of your Azure app with command-line tools

You can automate deployment of your Azure apps with command-line tools. This article lists available tools and the useful links that show you how to use them in your deployment workflow.

Automate deployment with MSBuild

If you use the Visual Studio IDE for development, you can use MSBuild to automate anything you can do in your IDE. You can configure MSBuild to use either Web Deploy or FTP/FTPS to copy files. Web Deploy can also automate many other deployment-related tasks, such as deploying databases.

For more information about command-line deployment using MSBuild, see the following resources:

Automate deployment with Windows PowerShell

You can perform MSBuild or FTP deployment functions from Windows PowerShell. If you do that, you can also use a collection of Windows PowerShell cmdlets that make the Azure REST management API easy to call.

For more information, see the following resources:

Automate deployment with .NET management API

You can write C# code to perform MSBuild or FTP functions for deployment. If you do that, you can access the Azure management REST API to perform site management functions.

For more information, see the following resource:

Deploy from Azure Command-Line Interface (Azure CLI)

You can use the command line in Windows, Mac or Linux machines to deploy by using FTP. If you do that, you can also access the Azure REST management API using the Azure CLI.

For more information, see the following resource:

Deploy from Web Deploy command line

Web Deploy is Microsoft software for deployment to IIS that not only provides intelligent file sync features but also can perform or coordinate many other deployment-related tasks that can't be automated when you use FTP. For example, Web Deploy can deploy a new database or database updates along with your web app. Web Deploy can also minimize the time required to update an existing site since it can intelligently copy only changed files. Microsoft Visual Studio and Team Foundation Server have support for Web Deploy built-in, but you can also use Web Deploy directly from the command line to automate deployment. Web Deploy commands are very powerful but the learning curve can be steep.

More resources

Another deployment option to command-line automation is to use a cloud-based service such as Octopus Deploy. For more information, see Deploy ASP.NET applications to Azure Web Sites.

For more information on command-line tools, see the following resource: