From 32a645cb9eba215b8bbd1bf692b78fe5153b153d Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Wed, 3 Apr 2019 14:39:29 +0200 Subject: [PATCH] [XHarness] Fix IntermediateOutputPath getting inserted in the wrong place. --- tests/xharness/ProjectFileExtensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/xharness/ProjectFileExtensions.cs b/tests/xharness/ProjectFileExtensions.cs index 32ee40e93b68..d8c804ae139a 100644 --- a/tests/xharness/ProjectFileExtensions.cs +++ b/tests/xharness/ProjectFileExtensions.cs @@ -191,8 +191,7 @@ public static void SetIntermediateOutputPath (this XmlDocument csproj, string va return; // Make sure there's a top-level version too. - var project = csproj.ChildNodes [1]; - var property_group = project.ChildNodes [0]; + var property_group = csproj.SelectSingleNode("/*/*[local-name() = 'PropertyGroup' and not(@Condition)]"); var intermediateOutputPath = csproj.CreateElement ("IntermediateOutputPath", MSBuild_Namespace); intermediateOutputPath.InnerText = value;