From 888e2921c4d6be53fd302bc39515f03707e9ce9c Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 5 Oct 2010 22:05:45 +0530 Subject: [PATCH] [xbuild] Update regex to not require EndProject in a sln file. In a solution file, a Project might not have a corresponding EndProject. This seems to be supported by VS, so updating xbuild to support that too. Updated the regex. --- mcs/tools/xbuild/SolutionParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcs/tools/xbuild/SolutionParser.cs b/mcs/tools/xbuild/SolutionParser.cs index 1d4dea89380..30e7b38a550 100644 --- a/mcs/tools/xbuild/SolutionParser.cs +++ b/mcs/tools/xbuild/SolutionParser.cs @@ -93,7 +93,7 @@ namespace Mono.XBuild.CommandLine { static string guidExpression = "{[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}}"; static Regex slnVersionRegex = new Regex (@"Microsoft Visual Studio Solution File, Format Version (\d?\d.\d\d)"); - static Regex projectRegex = new Regex ("Project\\(\"(" + guidExpression + ")\"\\) = \"(.*?)\", \"(.*?)\", \"(" + guidExpression + ")\"(\\s*?)((\\s*?)ProjectSection\\((.*?)\\) = (.*?)EndProjectSection(\\s*?))*(\\s*?)EndProject?", RegexOptions.Singleline); + static Regex projectRegex = new Regex ("Project\\(\"(" + guidExpression + ")\"\\) = \"(.*?)\", \"(.*?)\", \"(" + guidExpression + ")\"(\\s*?)((\\s*?)ProjectSection\\((.*?)\\) = (.*?)EndProjectSection(\\s*?))*(\\s*?)(EndProject)?", RegexOptions.Singleline); static Regex projectDependenciesRegex = new Regex ("ProjectSection\\((.*?)\\) = \\w*(.*?)EndProjectSection", RegexOptions.Singleline); static Regex projectDependencyRegex = new Regex ("\\s*(" + guidExpression + ") = (" + guidExpression + ")"); static Regex projectSectionPropertiesRegex = new Regex ("\\s*(?.*) = \"(?.*)\""); -- 2.25.1