Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running 2 publish profiles at same time?

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?

like image 684
user547794 Avatar asked Oct 05 '22 06:10

user547794


1 Answers

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

like image 80
jgerman Avatar answered Oct 13 '22 11:10

jgerman