Running 2 publish profiles at same time?

.net, asp.net, asp.net-mvc-4, visual-studio-2012, webdeploy

Solution

Have you tried writing a .bat file that deploys from the command line? You should be able to put both in the one file and thereby run both with just a double click. So the file would look something like:

msbuild MySolution.sln "/p:DeployOnBuild=true;PublishProfile=DeployProduction1;Configuration=Prod;Password=pwd"

msbuild MySolution.sln "/p:DeployOnBuild=true;PublishProfile=DeployProduction2;Configuration=Prod;Password=pwd"

As well as trial and error, I used the information from the following site, the section at the bottom labelled "Deploying from the Command Line": Tiny Happy Features #3 - Publishing Improvements, chained Config Transforms and Deploying ASP.NET Apps from the Command Line

Problem

I have 2 production servers that I need to deploy my app to every time. Right now I have 2 different publish profiles - 1 for each server. I run these manually through Visual Studio 2012 web deploy. Is there a way to automate running both publish profiles in a single step?

Original source