From ed323b2cba41f6085f575f332d30b71aa843df45 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 20 Feb 2009 10:17:21 +0000 Subject: [PATCH] * SolutionParser.cs (ParseSolution): Ignore solution folders. svn path=/trunk/mcs/; revision=127524 --- mcs/tools/xbuild/ChangeLog | 4 ++++ mcs/tools/xbuild/SolutionParser.cs | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/mcs/tools/xbuild/ChangeLog b/mcs/tools/xbuild/ChangeLog index d06f93bc46a..bdaefccbe5c 100644 --- a/mcs/tools/xbuild/ChangeLog +++ b/mcs/tools/xbuild/ChangeLog @@ -1,3 +1,7 @@ +2009-02-20 Ankit Jain + + * SolutionParser.cs (ParseSolution): Ignore solution folders. + 2009-02-20 Ankit Jain * SolutionParser.cs (ParseSolution): Ignore GlobalSection named diff --git a/mcs/tools/xbuild/SolutionParser.cs b/mcs/tools/xbuild/SolutionParser.cs index 7e3210db771..5dbc618e3c0 100644 --- a/mcs/tools/xbuild/SolutionParser.cs +++ b/mcs/tools/xbuild/SolutionParser.cs @@ -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 (); -- 2.25.1