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?
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!
here is an extract of the section of ccnet.config
<tasks>
<msbuild>
<ItemGroup>
<FilesToDelete Include="C:\CruiseControl\Working\\\**\*"/>
</ItemGroup>
<Target Name="Task" DependsOn="Preparation">
build
</Target>
<Target Name="Preparation">
<Delete Files="@(FilesToDelete)" />
</Target-->
<executable>
C:\WINDOWS\microsoft.net\Framework64\v3.5\MSBuild.exe
</executable>
<projectFile>Example.sln</projectFile>
<buildArgs>
/p:Configuration=Release /p:MSBuildExtensionsPath=C:\Progra~2\MSBuild /p:MSBuildEmitSolution=1 /verbosity:minimal
</buildArgs>
<logger>
C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
</logger>
</msbuild>
</tasks>
I have found the answer to my original question:
I simply had to put the cleanCopy true inside the sourcecontrol block.
<sourcecontrol type="svn">
<trunkUrl>TRUNK-URL</trunkUrl>
<executable>SVN.EXE</executable>
<username>TEST</username>
<password>TEST</password>
<cleanCopy>true</cleanCopy>
</sourcecontrol>