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
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@microsoft.com>2018-04-13 19:49:39 +0300
committerMatt Ward <matt.ward@microsoft.com>2018-04-13 19:49:39 +0300
commitdb71cb635cb4d1a82bafaec63c65f1b935b80be8 (patch)
treed867a9ff78430933c8a5ae9814dd80223dfe468b /main/src/core
parentc4d7ac7372464a0875acd7a13c6dc41838757c6e (diff)
[Core] Rework fix for wildcard expanding on saving a project
No need to evaluate the MSBuild item property since the evaluated property can be matched when the unevaluated property contains '%' characters. This is a re-work of the fix for VSTS #569295 - Projects that includes files using wildcards will expand (and remove) wildcards upon save
Diffstat (limited to 'main/src/core')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs8
1 files changed, 1 insertions, 7 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
index bba9a973a2..2be59e7e93 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
@@ -3780,7 +3780,6 @@ namespace MonoDevelop.Projects
{
// Compare only metadata, since item name and include can't change
- MSBuildEvaluationContext context = null;
var n = 0;
foreach (var p in item.Metadata.GetProperties ()) {
var p2 = evalItem.Metadata.GetProperty (p.Name);
@@ -3789,12 +3788,7 @@ namespace MonoDevelop.Projects
if (!p.ValueType.Equals (p.Value, p2.UnevaluatedValue)) {
if (p2.UnevaluatedValue != null && p2.UnevaluatedValue.Contains ('%')) {
// Check evaluated value is a match.
- if (context == null) {
- context = new MSBuildEvaluationContext ();
- context.InitEvaluation (MSBuildProject);
- }
- string value = context.Evaluate (p.UnevaluatedValue);
- if (!p.ValueType.Equals (p.Value, value))
+ if (!p.ValueType.Equals (p.Value, p2.Value))
return false;
} else
return false;