[xbuild] Add support for wildcards in Import.
authorAnkit Jain <radical@corewars.org>
Thu, 3 Mar 2011 15:59:40 +0000 (21:29 +0530)
committerAnkit Jain <radical@corewars.org>
Thu, 3 Mar 2011 19:20:30 +0000 (00:50 +0530)
commit613b532987c3e6ec1482be145b23fe8832da4b14
treef8f738d235b58d6813e27a37f75d10a112fa9ee1
parent9010dadcf965ef12cab4301b14cd75fef51ae908
[xbuild] Add support for wildcards in Import.

With 4.0 profile, <Import ..> can have wildcards. This works correctly
with our multiple MSBuildExtensionsPath also.

If the import references $(MSBuildExtensionsPath) property, then the
each extension path is used to resolve the import, and the search
stop as soon as an import is found.

If such an import uses wildcard, then the search stops at the
extension path in which *atleast one* file got imported.
And the import fails if any invalid project file is encountered.

This commit also heavily refactors the Import code to simplify
in the face of the new features, and improves error detection
and reporting.

ImportTest.cs: Add test for wildcards.
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ImportTest.cs