title: Provide credentials to MSBuild publish step that uses FileSystem deployment in TeamCity
body: <p>I work in a dev environment where the computers aren't part of a domain. I'm trying to set up TeamCity 8.05 on one of the computers to publish check-ins to a test server for our QA team. I've got it working the way I want when I deploy to local directories on the TeamCity server, but when I try to publish to the QA server I run in to permissions problem. I have a share on the QA server with a local user who I want to authenticate with when doing my publish. Is this possible with MSBuild?</p>
  
  <p>Command line switches to my MSBuild runner in TeamCity look like this:</p>
  
  <pre><code>/p:PublishProfile=./Alpha.publish /p:DeployOnBuild=true 
  /p:Configuration=Alpha /p:VisualStudioVersion=11.0 
  /p:UserName=QAServer\BuildUser /p:Password=somepass
  </code></pre>
  
  <p>The Alpha.publish file looks like this:</p>
  
  <pre><code>&lt;Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;WebPublishMethod&gt;FileSystem&lt;/WebPublishMethod&gt;
      &lt;LastUsedBuildConfiguration&gt;Alpha&lt;/LastUsedBuildConfiguration&gt;
      &lt;LastUsedPlatform&gt;Any CPU&lt;/LastUsedPlatform&gt;
      &lt;SiteUrlToLaunchAfterPublish /&gt;
      &lt;LaunchSiteAfterPublish&gt;False&lt;/LaunchSiteAfterPublish&gt;
      &lt;ExcludeApp_Data&gt;False&lt;/ExcludeApp_Data&gt;
      &lt;publishUrl&gt;\\QAServer\Alpha&lt;/publishUrl&gt;
      &lt;DeleteExistingFiles&gt;True&lt;/DeleteExistingFiles&gt;
      &lt;PrecompileBeforePublish&gt;True&lt;/PrecompileBeforePublish&gt;
      &lt;EnableUpdateable&gt;True&lt;/EnableUpdateable&gt;
      &lt;DebugSymbols&gt;False&lt;/DebugSymbols&gt;
      &lt;WDPMergeOption&gt;DonotMerge&lt;/WDPMergeOption&gt;
    &lt;/PropertyGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>I get an 'Access to the path \\QAServer\Alpha is denied' message when this step runs. I assume this is because the build agent runs as a system account which can't access the QAServer.</p>
  
  <p>I'm trying to avoid the overhead of using Web Deploy, but <a href="https://stackoverflow.com/questions/18989691/teamcity-web-deploy-with-msbuild-and-the-file-system">it looks like that would work for me</a> if this isn't possible.</p>