[tests] Info.plists should be inside LogicalName, not Link.

This makes it possible to simplify a bit more code inside xharness as well.
This commit is contained in:
Rolf Bjarne Kvinge 2020-07-23 15:33:38 +02:00
Родитель 1e9ac8099e
Коммит 1eb0c2cd3b
7 изменённых файлов: 7 добавлений и 15 удалений

Просмотреть файл

@ -72,7 +72,7 @@
</ItemGroup>
<ItemGroup>
<None Include=".\Info.plist">
<Link>Info.plist</Link>
<LogicalName>Info.plist</LogicalName>
</None>
<None Include=".\Entitlements.plist">
<Link>Entitlements.plist</Link>

Просмотреть файл

@ -86,7 +86,7 @@
</ItemGroup>
<ItemGroup>
<None Include=".\Info.plist">
<Link>Info.plist</Link>
<LogicalName>Info.plist</LogicalName>
</None>
<None Include=".\Entitlements.plist">
<Link>Entitlements.plist</Link>

Просмотреть файл

@ -165,7 +165,7 @@
</ItemGroup>
<ItemGroup>
<None Include="%PLIST PATH%">
<Link>Info.plist</Link>
<LogicalName>Info.plist</LogicalName>
</None>
<None Include="%TEMPLATESPATH%\iOSApp\Entitlements.plist">
<Link>Entitlements.plist</Link>

Просмотреть файл

@ -152,7 +152,7 @@
</ItemGroup>
<ItemGroup>
<None Include="%PLIST PATH%">
<Link>Info.plist</Link>
<LogicalName>Info.plist</LogicalName>
</None>
<None Include="%TEMPLATESPATH%\tvOSApp\Entitlements.plist">
<Link>Entitlements.plist</Link>

Просмотреть файл

@ -601,18 +601,10 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared.Utilities {
{
var logicalNames = csproj.SelectNodes ("//*[local-name() = 'LogicalName']");
foreach (XmlNode ln in logicalNames) {
if (!ln.InnerText.Contains("Info.plist"))
if (ln.InnerText != "Info.plist")
continue;
return ln.ParentNode;
}
var nodes = csproj.SelectNodes ("//*[local-name() = 'None' and contains(@Include ,'Info.plist')]");
if (nodes.Count > 0) {
return nodes [0]; // return the value, which could be Info.plist or a full path (linked).
}
nodes = csproj.SelectNodes ("//*[local-name() = 'None' and contains(@Include ,'Info-tv.plist')]");
if (nodes.Count > 0) {
return nodes [0]; // return the value, which could be Info.plist or a full path (linked).
}
if (throw_if_not_found)
throw new Exception ($"Could not find Info.plist include.");
return null;

Просмотреть файл

@ -72,7 +72,7 @@
</ItemGroup>
<ItemGroup>
<None Include=".\Info.plist">
<Link>Info.plist</Link>
<LogicalName>Info.plist</LogicalName>
</None>
<None Include=".\Entitlements.plist">
<Link>Entitlements.plist</Link>

Просмотреть файл

@ -86,7 +86,7 @@
</ItemGroup>
<ItemGroup>
<None Include=".\Info.plist">
<Link>Info.plist</Link>
<LogicalName>Info.plist</LogicalName>
</None>
<None Include=".\Entitlements.plist">
<Link>Entitlements.plist</Link>