[dotnet] Include the parsed runtimeconfig.bin into ResolvedFileToPublish. Contributes towards #17579. (#18087)
This makes it unnecessary to special-case this file for it to copied correctly when building on Windows (once we've fixed the Windows build to use ResolvedFileToPublish as the source of truth, like we do on macOS). This is the first part of a fix for https://github.com/xamarin/xamarin-macios/issues/17579.
This commit is contained in:
Родитель
d4797e605b
Коммит
9615de3334
|
@ -1381,10 +1381,16 @@
|
|||
<_AssemblyPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(_RelativeAppBundlePath)\Contents\$(_CustomBundleName)\</_AssemblyPublishDir>
|
||||
<_DylibPublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(_RelativeAppBundlePath)\</_DylibPublishDir>
|
||||
<_DylibPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(_RelativeAppBundlePath)\Contents\$(_CustomBundleName)\</_DylibPublishDir>
|
||||
<!-- _ParsedRuntimeConfigFilePath must be relative to the project directory, since it's not copied to the publish directory by the the CopyFilesToPublishDirectory targets -->
|
||||
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$([MSBuild]::MakeRelative($(MSBuildProjectDirectory),$(_AbsolutePublishDir)\$(_AssemblyPublishDir)\$(_RuntimeConfigurationFile)))</_ParsedRuntimeConfigFilePath>
|
||||
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$(DeviceSpecificIntermediateOutputPath)$(_RuntimeConfigurationFile)</_ParsedRuntimeConfigFilePath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- Add runtimeconfig.bin to ResolvedFileToPublish so we process it in ComputeBundlePath and copy the file to the app bundle -->
|
||||
<ResolvedFileToPublish Include="$(_ParsedRuntimeConfigFilePath)" Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true'">
|
||||
<RelativePath>$([System.IO.Path]::GetFileName('$(_ParsedRuntimeConfigFilePath)'))</RelativePath>
|
||||
<PublishFolderType>Assembly</PublishFolderType>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</ResolvedFileToPublish>
|
||||
|
||||
<!--
|
||||
Remove any items we've already handled elsewhere
|
||||
-->
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace Xamarin.Tests {
|
|||
switch (platform) {
|
||||
case ApplePlatform.iOS:
|
||||
var appExecutable = Path.Combine (appPath, Path.GetFileName (project_path));
|
||||
Assert.That (appPath, Does.Exist, "There is an .app");
|
||||
Assert.That (appPath, Does.Not.Exist, "There is an .app");
|
||||
Assert.That (appExecutable, Does.Not.Empty, "There is no executable");
|
||||
Assert.That (Path.Combine (appPath, Configuration.GetBaseLibraryName (platform, true)), Does.Not.Exist, "Platform assembly is in the bundle");
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче