[Mono-list] XBuild question removing directories
Mike Christensen
mike at kitchenpc.com
Thu Dec 22 10:54:22 EST 2011
Ah excellent, it's not a deal-breaker right now so I'll just wait
until the next version..
On Wed, Dec 21, 2011 at 10:33 PM, Jonathan Pobst <monkey at jpobst.com> wrote:
> The good news is this has been fixed:
> https://github.com/mono/mono/commit/7c4e3654cb758d2f8543a4d8b0b4d5b25af780c3
>
> The bad news is that probably doesn't help you.
>
> I was writing my own tasks, so I just included the updated source code in my
> assembly and called it RemoveDirFixed. Not sure if you have the same
> luxury.
>
> Jonathan
>
>
>
> On 12/22/2011 12:20 AM, Mike Christensen wrote:
>>
>> I have the following target:
>>
>> <Target Name="Clean">
>> <RemoveDir Directories="$(BuildDir)" Condition=" Exists('$(BuildDir)')
>> " />
>> <RemoveDir Directories="Imp/bin" Condition=" Exists('Imp/bin') " />
>> <RemoveDir Directories="Imp/obj" Condition=" Exists('Imp/obj') " />
>> <RemoveDir Directories="Modeler/bin" Condition=" Exists('Modeler/bin')
>> " />
>> <RemoveDir Directories="Modeler/obj" Condition=" Exists('Modeler/obj')
>> " />
>> <RemoveDir Directories="Queue/bin" Condition=" Exists('Queue/bin') "
>> />
>> <RemoveDir Directories="Queue/obj" Condition=" Exists('Queue/obj') "
>> />
>> <RemoveDir Directories="WebSite/bin" Condition=" Exists('WebSite/bin')
>> " />
>> <RemoveDir Directories="WebSite/obj" Condition=" Exists('WebSite/obj')
>> " />
>> </Target>
>>
>> When I run it I get:
>>
>>
>> ~/KitchenPC> ./clean
>> XBuild Engine Version 2.10.6.0
>> Mono, Version 2.10.6.0
>> Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
>> /Users/mike/kitchenpc/build.xml: error : Directory
>> /Users/mike/KitchenPC/Build is not empty at
>> System.IO.Directory.Delete (System.String path) [0x00000] in<filename
>> unknown>:0
>> at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in<filename
>> unknown>:0
>> /Users/mike/kitchenpc/build.xml: error : Directory
>> /Users/mike/KitchenPC/Imp/bin is not empty at
>> System.IO.Directory.Delete (System.String path) [0x00000] in<filename
>> unknown>:0
>> at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in<filename
>> unknown>:0
>> /Users/mike/kitchenpc/build.xml: error : Directory
>> /Users/mike/KitchenPC/Imp/obj is not empty at
>> System.IO.Directory.Delete (System.String path) [0x00000] in<filename
>> unknown>:0
>> at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in<filename
>> unknown>:0
>> /Users/mike/kitchenpc/build.xml: error : Directory
>> /Users/mike/KitchenPC/Modeler/obj is not empty at
>> System.IO.Directory.Delete (System.String path) [0x00000] in<filename
>> unknown>:0
>> at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in<filename
>> unknown>:0
>> /Users/mike/kitchenpc/build.xml: error : Directory
>> /Users/mike/KitchenPC/Queue/bin is not empty at
>> System.IO.Directory.Delete (System.String path) [0x00000] in<filename
>> unknown>:0
>> at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in<filename
>> unknown>:0
>> /Users/mike/kitchenpc/build.xml: error : Directory
>> /Users/mike/KitchenPC/Queue/obj is not empty at
>> System.IO.Directory.Delete (System.String path) [0x00000] in<filename
>> unknown>:0
>> at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in<filename
>> unknown>:0
>> /Users/mike/kitchenpc/build.xml: error : Directory
>> /Users/mike/KitchenPC/WebSite/obj is not empty at
>> System.IO.Directory.Delete (System.String path) [0x00000] in<filename
>> unknown>:0
>> at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in<filename
>> unknown>:0
>> ~/KitchenPC>
>>
>> On MSBuild, this works fine. Is there a way to make it remove these
>> directories without an error? I suppose I could Exec a "rm -R -f" but
>> I'd rather something that was cross-platform. Thanks!
>>
>> Mike
>> _______________________________________________
>> Mono-list maillist - Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>>
>
More information about the Mono-list
mailing list