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:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2014-05-23 04:37:33 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2014-05-23 04:37:33 +0400
commit4480f1ebad9460deef806feb84278f9add937ed2 (patch)
treec4e331a5432213881ab22f5585f381e7301815aa /main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
parentb3efea6240fc74d208f1ce93fd8caf381bacaff3 (diff)
[Core] Serialize LogicalName for non-EmbeddedResource items
BXC19470 - Resource ID changes made in the Properties pad not reflected in the csproj
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
index 5031c8b036..a9c519ef31 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
@@ -1514,11 +1514,17 @@ namespace MonoDevelop.Projects.Formats.MSBuild
} else {
buildItem.UnsetMetadata ("Visible");
}
-
- if (file.BuildAction == BuildAction.EmbeddedResource) {
- //Emit LogicalName only when it does not match the default Id
- if (GetDefaultResourceId (file) != file.ResourceId)
- buildItem.SetMetadata ("LogicalName", file.ResourceId);
+
+ var resId = file.ResourceId;
+
+ //For EmbeddedResource, emit LogicalName only when it does not match the default Id
+ if (file.BuildAction == BuildAction.EmbeddedResource && GetDefaultResourceId (file) == resId)
+ resId = null;
+
+ if (!string.IsNullOrEmpty (resId)) {
+ buildItem.SetMetadata ("LogicalName", resId);
+ } else {
+ buildItem.UnsetMetadata ("LogicalName");
}
}