diff options
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs | 5 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs index 0cc36a1f0e..49f790ef94 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs @@ -1435,7 +1435,10 @@ namespace MonoDevelop.Projects.MSBuild { var pi = (ProjectInfo)projectInstance; string filePath = MSBuildProjectService.FromMSBuildPath (pi.Project.BaseDirectory, include); - foreach (var g in pi.GlobIncludes.Where (g => g.Condition)) { + foreach (var g in pi.GlobIncludes) { + if (!g.Condition) + continue; + if (g.ExcludeRegex != null) { if (g.ExcludeRegex.IsMatch (include)) continue; diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs index d2874912c7..703bbcf97d 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs @@ -843,7 +843,7 @@ namespace MonoDevelop.Projects.MSBuild { int i = str.IndexOfAny (specialCharacters); if (i != -1) { - var sb = new System.Text.StringBuilder (); + var sb = StringBuilderCache.Allocate (); int start = 0; while (i != -1) { sb.Append (str, start, i - start); @@ -855,7 +855,7 @@ namespace MonoDevelop.Projects.MSBuild } if (start < str.Length) sb.Append (str, start, str.Length - start); - return sb.ToString (); + return StringBuilderCache.ReturnAndFree (sb); } return str; } |