title: MSBuild and Jenkins: where to put credentials?
body: <p>I am trying to set up a small continuous integration server using Jenkins, Git and MSBuild.<br />
  I have read so many different tutorials on this topic but I still have so many questions!</p>
  <p>I created a Jenkins job which will pull changes from Git and deploy to another server with MSBuild.</p>
  <p>The build action is calling MSBuild.exe and takes the following properties:</p>
  <pre><code>/p:VisualStudioVersion=12.0
  /p:Configuration=Release
  /p:Platform=&quot;Any CPU&quot;
  /p:DeployOnBuild=True
  /p:DeployTarget=Test
  /p:MsDeployServiceUrl=https://myserver:8172/MsDeploy.axd
  /p:AllowUntrustedCertificate=True
  /p:UserName=myusername
  /p:Password=mypassword
  </code></pre>
  <p>It is working happily, but I would like to know more. For example:</p>
  <ol>
  <li>I am specifying the credentials as properties. Is there a better way to go? Please note that the deployment server is external (not in LAN)</li>
  <li>Do I need to use the <code>/P:CreatePackageOnPublish=True</code> property? If yes, why?</li>
  </ol>
  <p>Until now I have tried to follow the following tutorials:</p>
  <ul>
  <li><a href="http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity.html" rel="nofollow noreferrer">http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity.html</a></li>
  <li><a href="http://www.infoq.com/articles/MSBuild-1" rel="nofollow noreferrer">http://www.infoq.com/articles/MSBuild-1</a></li>
  <li><a href="http://www.jayway.com/2012/10/17/a-simple-continuous-integration-and-deployment-workflow-with-asp-net-mvc-github-and-jenkins/" rel="nofollow noreferrer">http://www.jayway.com/2012/10/17/a-simple-continuous-integration-and-deployment-workflow-with-asp-net-mvc-github-and-jenkins/</a></li>
  </ul>