title: TFS 2010 Build Publish via file system
body: <p>I've got a fairly large MVC2 project in TFS which gets built automatically on checkin (Continuous Integration)</p>
  
  <p>At present, the fully built version is dumped on a network share on our dev IIS server. <code>\\Server\wwwrootLatest</code></p>
  
  <p>TFS of course creates lots of sub-folders since it's just doing a build, it isn't even aware that it's drop directory is a wwwroot.</p>
  
  <p>This means that to actually USE the build, we need to go and manually create an IIS App which points at the appropriate directory - which defeats the whole object of the exercise.</p>
  
  <p>When we do a manual publish to that server, we use "File System" as the method and just overwrite the files in the UNC share <code>\\Server\wwwroot</code></p>
  
  <p>(When publishing to other environments, we use full-on MSDeploy.)</p>
  
  <p>What I'd like to do is convince TFS to do a "File system" publish after the build completes and duplicate what we do on a manual publish eg:</p>
  
  <p>Drop directory is <code>\\Server\Build</code> which would result in something like <code>\\Server\Build\Project\Date.Rev\</code></p>
  
  <p>After that is complete, we want it to publish to <code>\\Server\wwwrootLatest</code> - we can then set up the App once which will always contain the latest version but will still have a full history if required.</p>
  
  <p>The only examples I've been able to find use MSBuild commands in the build definition (fine) but all use MSDeploy to do a full-on publish. I'm not sure how to automate what I want to do</p>
  
  <p>Any help appreciated.</p>