Wednesday, December 9, 2015

Using Visual Studio Publish Profiles in TeamCity

If you want to use Publishing Profiles while building your Visual Studio solutions in TeamCity, you will discover that it is relatively easy to accomplish!

First of all, you will want to create 2 System Properties (under the Parameters for the Build Configuration Settings):

  1. system.PublishProfile - set to the value of your PublishProfile (such as Release)
  2. system.DeployOnBuild - set to true
That is all that is needed!  Now, when TeamCity builds your Visual Studio solution, it will automatically pass these parameters to your Visual Studio build step as MSBuild Command line parameters.

If you then take a look at your Build Configuration's Build Log, you will notice that these parameters are being passed to your Visual Studio build so that your Publishing Profile is being executed!


No comments:

Post a Comment