diff --git a/tests/xharness/ProjectFileExtensions.cs b/tests/xharness/ProjectFileExtensions.cs index 4feda9e9b6a2..ff72f51155e0 100644 --- a/tests/xharness/ProjectFileExtensions.cs +++ b/tests/xharness/ProjectFileExtensions.cs @@ -796,6 +796,7 @@ public static void ResolveAllPaths (this XmlDocument csproj, string project_path new string [] { "ObjcBindingCoreSource", "Include" }, new string [] { "ObjcBindingNativeLibrary", "Include" }, new string [] { "ObjcBindingNativeFramework", "Include" }, + new string [] { "Import", "Project", "CustomBuildActions.targets", "../SyncTestResources.targets" }, new string [] { "FilesToCopy", "Include" }, new string [] { "FilesToCopyFoo", "Include" }, new string [] { "FilesToCopyFooBar", "Include" }, @@ -843,10 +844,22 @@ public static void ResolveAllPaths (this XmlDocument csproj, string project_path var a = node.Attributes [attrib]; if (a == null) continue; + + // entries after index 2 is a list of values to filter the attribute value against. + var found = kvp.Length == 2; + var skipLogicalName = kvp.Length > 2; + for (var i = 2; i < kvp.Length; i++) { + if (a.Value.Contains ("Sync")) + Console.WriteLine ("STOP"); + found |= a.Value == kvp [i]; + } + if (!found) + continue; + // Fix any default LogicalName values (but don't change existing ones). var ln = node.SelectElementNodes ("LogicalName")?.SingleOrDefault (); var links = node.SelectElementNodes ("Link"); - if (ln == null && !links.Any ()) { + if (!skipLogicalName && ln == null && !links.Any ()) { ln = csproj.CreateElement ("LogicalName", MSBuild_Namespace); node.AppendChild (ln);