You can read all about RecursiveDir here, but basically MSBuild supports a syntax for recursive directories that goes a little something like this:

C:\My Projects\**\*.xml

Basically this says, go recursively through every directory under C:\My Project and find me all the files with an .xml extension. Simple right? Ok, now imagine you structured all your projects in such a way that you kept certain xml files in certain subdirectory of each project... let's call it “Test Results”. So, if I want to grab all the test results for all projects, but not any other .xml files, I would do this:

C:\My Projects\**\Test Results\*.xml

Follow so far? Now consider the following example directory structure:

C:\My Projects
      |- Project A
            |- Test Results
                  |- 4-11-06.xml
                  |- 4-12-06.xml

Ok, the documentation states that the RecursiveDir metadata will be equivalent to the path that is expanded by the ** notation. When I use the first path declaration I end up with the following for RecursiveDir:

Project A\Test Results\

Great, that's just what I'd expect because the ** resulted in both the Project A and Test Results directory being selected. However if I use the second path I still end up with this for RecursiveDir:

Project A\Test Results\

Hmmm... not what I'd expect. I would have expected only Project A to be included in the RecursiveDir value because Test Results was an explicit part of the path.