Skip to content

Commit db7dd11

Browse files
authored
[msbuild] Fix BundleResource defaults for iOS and MacCatalyst (#23835)
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2172694 Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2172757 This PR #21350 added the new `PrivacyInfo.xcprivacy` to our default templates (new requirement from Apple) when building from Windows we try to bundle this resource and unfortunately we are missing the required Link metadata when this is done from single project triggering a condition where the path is incorrectly calculated when zipped in windows and once the zip archive is transfered to the mac host it is unable to unarchive the file. To fix this we simply unify the logic with what the macios SDK currently does [1] this ensures the right bundling happens. [1]: https://github.com/xamarin/xamarin-macios/blob/main/dotnet/targets/Microsoft.Sdk.DefaultItems.template.props#L77
1 parent d54c8fa commit db7dd11

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.Globs.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
<BundleResource
6767
Include="$(iOSProjectFolder)Resources\**"
6868
Exclude="$(_SingleProjectiOSExcludes)"
69+
Link="$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))"
6970
IsDefaultItem="true"
7071
/>
7172
<ImageAsset
@@ -101,6 +102,7 @@
101102
<BundleResource
102103
Include="$(MacCatalystProjectFolder)Resources\**"
103104
Exclude="$(_SingleProjectMacCatalystExcludes)"
105+
Link="$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))"
104106
IsDefaultItem="true"
105107
/>
106108
<ImageAsset

0 commit comments

Comments
 (0)