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:
authorLluis Sanchez Gual <lluis@novell.com>2011-03-16 19:46:04 +0300
committerLluis Sanchez Gual <lluis@novell.com>2011-03-16 21:53:18 +0300
commit2eec0af870405b6c3ec70a53ed070b05d8ad9db4 (patch)
tree9359f4a185eb9fd971e76d095f27138f4de3e79b /main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
parent0b2be56cf45178723069a90f8f29ab276046f8ce (diff)
Improved compatibility with VS/SD file formats
This is a partial fix of bug #664644. MD will now generate project configurations for all config/platform combinations found in the project file, even when there isn't a property group for every configuration/platform. So for example, if the msbuild file has a property group for Debug and another one for x86, this will generate a Debug|x86 configuration. When saving the project, this new configuration will not be saved, unless configuration specific values have been set. Also, when merging/unmerging properties, do case insensitive comparison of values (msbuild is supposed to be case insensitive).
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
index 009c856bc6..b568a2df24 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
@@ -392,7 +392,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
string GetPropertyValue (string name);
bool RemoveProperty (string name);
void RemoveAllProperties ();
- void UnMerge (MSBuildPropertySet baseGrp);
+ void UnMerge (MSBuildPropertySet baseGrp, ISet<string> propertiesToExclude);
}
class MSBuildPropertyGroupMerged: MSBuildPropertySet
@@ -456,10 +456,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- public void UnMerge (MSBuildPropertySet baseGrp)
+ public void UnMerge (MSBuildPropertySet baseGrp, ISet<string> propertiesToExclude)
{
foreach (var g in groups) {
- g.UnMerge (baseGrp);
+ g.UnMerge (baseGrp, propertiesToExclude);
}
}
@@ -573,11 +573,13 @@ namespace MonoDevelop.Projects.Formats.MSBuild
properties.Clear ();
}
- public void UnMerge (MSBuildPropertySet baseGrp)
+ public void UnMerge (MSBuildPropertySet baseGrp, ISet<string> propsToExclude)
{
foreach (MSBuildProperty prop in baseGrp.Properties) {
+ if (propsToExclude != null && propsToExclude.Contains (prop.Name))
+ continue;
MSBuildProperty thisProp = GetProperty (prop.Name);
- if (thisProp != null && prop.Value == thisProp.Value)
+ if (thisProp != null && prop.Value.Equals (thisProp.Value, StringComparison.CurrentCultureIgnoreCase))
RemoveProperty (prop.Name);
}
}