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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With