* SolutionParser.cs (ParseSolution): Ignore solution folders.
authorAnkit Jain <radical@corewars.org>
Fri, 20 Feb 2009 10:17:21 +0000 (10:17 -0000)
committerAnkit Jain <radical@corewars.org>
Fri, 20 Feb 2009 10:17:21 +0000 (10:17 -0000)
svn path=/trunk/mcs/; revision=127524

mcs/tools/xbuild/ChangeLog
mcs/tools/xbuild/SolutionParser.cs

index d06f93bc46adea9cf100f73ea0ff53ef2848031d..bdaefccbe5c1c46644513ff01206b0ec2669ac92 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-20  Ankit Jain  <jankit@novell.com>
+
+       * SolutionParser.cs (ParseSolution): Ignore solution folders.
+
 2009-02-20  Ankit Jain  <jankit@novell.com>
 
        * SolutionParser.cs (ParseSolution): Ignore GlobalSection named
index 7e3210db7713c52d48b5fb95d35df1a2fcf0171f..5dbc618e3c0fc69b8c24a56f43c28790c6e634f1 100644 (file)
@@ -84,6 +84,7 @@ namespace Mono.XBuild.CommandLine {
                static Regex projectConfigurationActiveCfgRegex = new Regex ("\\s*(" + guidExpression + ")\\.(.+?)\\|(.+?)\\.ActiveCfg = (.+?)\\|(.+)");
                static Regex projectConfigurationBuildRegex = new Regex ("\\s*(" + guidExpression + ")\\.(.*?)\\|(.*?)\\.Build\\.0 = (.*?)\\|(.+)");
 
+               static string solutionFolderGuid = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}";
 
                public void ParseSolution (string file, Project p)
                {
@@ -99,6 +100,13 @@ namespace Mono.XBuild.CommandLine {
                        Match m = projectRegex.Match (line);
                        while (m.Success) {
                                ProjectInfo projectInfo = new ProjectInfo (m.Groups[2].Value, m.Groups[3].Value);
+                               if (String.Compare (m.Groups [1].Value, solutionFolderGuid,
+                                               StringComparison.InvariantCultureIgnoreCase) == 0) {
+                                       // Ignore solution folders
+                                       m = m.NextMatch ();
+                                       continue;
+                               }
+
                                projectInfos.Add (new Guid (m.Groups[4].Value), projectInfo);
 
                                Project currentProject = p.ParentEngine.CreateNewProject ();