title: CCNet - Delete working copy before MSBuild?
body: <p>I'm setting up a continuous integration environment, using VisualSVN Server and CrusieControl.NET. 
  What I want to do is delete the working copy before the MSBuild task starts?</p>
  
  <p>I have read that I could use Nant or a Batch file which ccnet would invoke.
  What is best practice here?
  Any help on this would me great!</p>
  
  <p>here is an extract of the  section of ccnet.config</p>
  
  <pre><code>      &lt;tasks&gt;
          &lt;msbuild&gt;
              &lt;ItemGroup&gt;
                  &lt;FilesToDelete Include="C:\CruiseControl\Working\\\**\*"/&gt;
              &lt;/ItemGroup&gt;
              &lt;Target Name="Task" DependsOn="Preparation"&gt;
                    build
              &lt;/Target&gt;
              &lt;Target Name="Preparation"&gt;
                    &lt;Delete Files="@(FilesToDelete)" /&gt;
              &lt;/Target--&gt;
              &lt;executable&gt;                                                      
                  C:\WINDOWS\microsoft.net\Framework64\v3.5\MSBuild.exe                                              
              &lt;/executable&gt; 
              &lt;projectFile&gt;Example.sln&lt;/projectFile&gt;  
              &lt;buildArgs&gt;
                  /p:Configuration=Release /p:MSBuildExtensionsPath=C:\Progra~2\MSBuild /p:MSBuildEmitSolution=1 /verbosity:minimal
              &lt;/buildArgs&gt;                                                      
              &lt;logger&gt;
                  C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
              &lt;/logger&gt;
          &lt;/msbuild&gt;
        &lt;/tasks&gt;
  </code></pre>