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@xamarin.com>2017-01-23 20:04:28 +0300
committerMatt Ward <matt.ward@xamarin.com>2017-01-23 20:04:28 +0300
commit67a406fe24df088dc95c32e4e9bd6f771cd7989a (patch)
tree0743d2541ab0901a66afead15135a9af0a01fb9b /main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildImport.cs
parentca468eda8e46284d14f8c8cc6c9281a8635b660a (diff)
[Core] Fix import patching
Patching an import replaces the original import with two new imports. The second import was being added as a child of the first import since the first import element was not being closed.
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildImport.cs')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildImport.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildImport.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildImport.cs
index bc821dad2e..c64ab829ce 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildImport.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildImport.cs
@@ -79,7 +79,7 @@ namespace MonoDevelop.Projects.MSBuild
base.Write (writer, context);
}
- void WritePatchedImport (XmlWriter writer, string newTarget)
+ internal void WritePatchedImport (XmlWriter writer, string newTarget)
{
/* If an import redirect exists, add a fake import to the project which will be used only
if the original import doesn't exist. That is, the following import:
@@ -102,6 +102,7 @@ namespace MonoDevelop.Projects.MSBuild
writer.WriteStartElement ("Import", MSBuildProject.Schema);
writer.WriteAttributeString ("Project", target);
writer.WriteAttributeString ("Condition", cond);
+ writer.WriteEndElement ();
// Now add the fake import, with a condition so that it will be used only if the original
// import does not exist.
@@ -113,6 +114,7 @@ namespace MonoDevelop.Projects.MSBuild
writer.WriteStartElement ("Import", MSBuildProject.Schema);
writer.WriteAttributeString ("Project", MSBuildProjectService.ToMSBuildPath (null, newTarget));
writer.WriteAttributeString ("Condition", cond);
+ writer.WriteEndElement ();
}
}