Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the ASP.NET work, for me, the easiest way I do it (which allows me to hit either MSBUild or NAnt depending upon the project) was to roll my own exe that takes an argument which I pass in with a bat file fired by CC.NET. It's not the safest thing in the world, but if you have total control over your automated build machine; it's not too shabby. Quick and reusable.</p> <p>Drop in the exe somewhere that does the recursive delete: <br><br><code> static void Main(string[] args)</p> <pre><code>{ for (int n = 0; n &lt; args.Length; n++) { if (Directory.Exists(args[n].ToString())) { Directory.Delete(args[n].ToString(), true); } } } </code></pre> <p></code> <br><br> Drop it in somewhere multiple files can pass arguments to it and just write a custom .bat file for each project. So my task block looks like this: <br><br></p> <pre> &lt;tasks&gt; &lt;msbuild&gt; &lt;executable&gt;C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe&lt;/executable&gt; &lt;workingDirectory&gt;Z:\WorkingDirectory&lt;/workingDirectory&gt; &lt;projectFile&gt;YourSolution.sln&lt;/projectFile&gt; &lt;logger&gt;C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll&lt;/logger&gt; &lt;/msbuild&gt; &lt;exec&gt; &lt;executable&gt;Z:\SomePathToBuildScripts\YourCustomBat.bat&lt;/executable&gt; &lt;/exec&gt; &lt;/tasks&gt; </pre> <p><br><br> Then the final step is setting up that .bat file to perform the delete/rebuild functions after use. In the bat file just make sure you rebuild ("MD") the directories you deleted if youexpect to publish a site back to them. On our dev boxes I found this to be the best way to prevent the beloved Frankenbuild.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload