title: How do I get Team Build 2010 to publish web applications as non-updatable?
body: <p>I'm trying to switch our build from CruiseControl.NET running a custom .msbuild file to Team Build 2010.  The application being compiled is a VS2008 solution with numerous projects, two of which are web projects.</p>
  
  <p>Using DefaultTemplate.xaml, it appears that the two web projects are deployed to <code>Binaries\_PublishedWebsites\(ProjectName)</code>.  That default location is fine.  However, the contents of the output directories appear to be updateable, as though <code>aspnet_compiler.exe</code> was called with <code>-u</code>, or as though an MSBuild <code>&lt;AspNetCompiler&gt;</code> task was used with <code>Updateable="true"</code>.  So, two questions:</p>
  
  <ol>
  <li>How do I make Team Build produce non-updateable output to the <code>_PublishedWebsites</code> directory?</li>
  <li><p>How can I also set the IIS VirtualPath as if I was doing the following in an MSBuild task:</p>
  
  <pre><code>&lt;AspNetCompiler Clean="true" Force="true" VirtualPath="/My-IIS-Virtual-Path" /&gt;
  </code></pre></li>
  </ol>
  
  <p>I have found in earlier troubleshooting that the only way I can get IIS 6 to serve a web service compiled with <code>aspnet_compiler.exe</code> in non-updateable mode is to specify the virtual path in the command, which is why I am asking about #2.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Upon seeing the one answer thus far, I realized I should have been much clearer about what the issue is.  I realize that, if I can do something in MSBuild, I can just call MSBuild from the build template.  However, I am wondering a little more about how change what happens to copy the output to the <code>_PublishedWebsites</code> directory.  "Find the task that copies the website and change it" would work well, except that I don't see what is actually copying the output into <code>_PublishedWebsites</code>.  What I'm really wanting to do is to modify the step in the template that accomplishes this.</p>
  
  <p>The build log references a compile target called <code>_CopyWebApplication</code> that appears to do the work of copying the files needed for a web application.  However, I am unsure how to modify this compile target, as I do not see it anywhere in the build template nor in any file in the solution.  Further, whatever runs <code>_CopyWebApplication</code> appears to be running it only for web application projects, not the many other projects in the solution.  This is a good thing, except that I do not know where the logic exists that determines whether to use <code>_CopyWebApplication</code>.</p>
  
  <p>Maybe there is some default MSBuild file that I am missing?  Some build parameter that I could be using?  How do I alter the aforementioned build step?</p>