[Mono-bugs] [Bug 710234] New: XBuild RemoveDir task crashes if directory does not exist, MSBuild silently ignores

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 4 04:05:02 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=710234

https://bugzilla.novell.com/show_bug.cgi?id=710234#c0


           Summary: XBuild RemoveDir task crashes if directory does not
                    exist, MSBuild silently ignores
    Classification: Mono
           Product: Mono: Tools
           Version: 2.10.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: xbuild
        AssignedTo: jankit at novell.com
        ReportedBy: imaudi at comcast.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0)
AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30

In XBuild:

<RemoveDir Directories="Foo" />

Will crash if Foo does not exist.  MSBuild will ignore and do nothing.

Reproducible: Always

Steps to Reproduce:
1. Create project which tries to RemoveDir a non-existant directory
2. Run target
3. See error
Actual Results:  
error : Directory 'xxxxx' not found.  at
System.IO.Directory.ValidateDirectoryListing (System.String path, System.String
searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0          
  at System.IO.Directory.GetFileSystemEntries (System.String path,
System.String searchPattern, FileAttributes mask, FileAttributes attrs)
[0x00000] in <filename unknown>:0                                               
  at System.IO.Directory.GetDirectories (System.String path, System.String
searchPattern) [0x00000] in <filename unknown>:0                         
  at System.IO.Directory.GetDirectories (System.String path) [0x00000] in
<filename unknown>:0                                                      
  at System.IO.Directory.RecursiveDelete (System.String path) [0x00000] in
<filename unknown>:0                                                     
  at System.IO.Directory.Delete (System.String path, Boolean recursive)
[0x00000] in <filename unknown>:0                                           
  at Microsoft.Build.Tasks.RemoveDir.Execute () [0x00000] in <filename
unknown>:0         

Expected Results:  
XBuild should be compatible with MSBuild behavior and ignore non-existant
directories.

XBuild Engine Version 2.11.0.0

Mono, Version 2.11.0.0

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list