Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2016-09-22 13:48:17 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2016-09-22 13:48:17 +0300
commit2334d349303b221ef9ad5008a1b5fdce97f51e06 (patch)
tree4060de895944d65c96c7ae25d59331796f617456 /main
parent6468fcff0e1dfcfdb44460727db68ea4c67ab753 (diff)
[MSBuild] Don't bother adding an evaluated item with an empty include
This step was being done too late, therefore some property evaluation in the stack was already trying to use an empty string include. The most common failure path is Path.GetFullPath in GetMetadataValue
Diffstat (limited to 'main')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs10
1 files changed, 5 insertions, 5 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 611c5ca12c..a7991b2ac0 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs
@@ -198,10 +198,6 @@ namespace MonoDevelop.Projects.MSBuild
EvaluateObjects (pi, context, objects, false);
EvaluateObjects (pi, context, objects, true);
- // Remove from the result all items that have an empty include. MSBuild never returns those.
-
- pi.EvaluatedItems.RemoveAll (it => it.Include.Length == 0);
-
// Once items have been evaluated, we need to re-evaluate properties that contain item transformations
// (or that contain references to properties that have transformations).
@@ -282,7 +278,11 @@ namespace MonoDevelop.Projects.MSBuild
}
static void AddItem (ProjectInfo project, MSBuildEvaluationContext context, MSBuildItem item, MSBuildItemEvaluated it, string include, Regex excludeRegex, bool trueCond)
- {
+ {
+ // Don't add the result from any item that has an empty include. MSBuild never returns those.
+ if (include == string.Empty)
+ return;
+
if (include.Length > 3 && include [0] == '@' && include [1] == '(' && include [include.Length - 1] == ')') {
// This is a transform
List<MSBuildItemEvaluated> evalItems;