[iOS] Cannot create archive due to the "Unzip" task failing with System.NotSupportedException because the app package content includes the link to local drive #22359
Labels
area-publishing
Issues with the app packaging/publishing process (ipk/apk/msix/trimming)
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
platform/iOS 🍎
s/needs-attention
Issue has more information and needs another look
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
This is essentially a duplicate of #19916
Opening a separate issue since the issue is closed and the cause is different in my case (removing
LaunchScreen.storyboard
did not help)Bug Description: The "Unzip" task fails during archive if there is a Resources folder with any images [may happen with other files too] within Platforms\iOS
If the above condition is met, the absolute path of the Platforms\iOS\Resources directory gets recreated inside the generated .app
Because of this, the "Unzip" task fails and archiving remains incomplete.
Note that the path reference still gets created for normal Build/Rebuild operation as well, but it completes successfully and the ipa is also generated if
BuildIpa
is set totrue
. The problem appears only during the Publish operation.The problem seems to occur just with the existence of such files even if the files are not referenced from .csproj.
Also it seems to not occur if the folder name is anything other than Resources.
Although the migration documentation states,
The consequences of not doing is not mentioned.
Since I am porting a Xamarin app to MAUI, I wanted keep the project structure as unchanged as possible (The Xamarin app included a separate Resources folder for images referenced from platform specific code)
I have created a repro as well. Make sure to change the
CodesignKey
andCodesignProvision
if you decide to use it.Steps to Reproduce
Link to public reproduction project repository
https://github.com/Emtiaz-Tafsir/MauiRepro/tree/main/MauiArchiveFailureRepro
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
All
Did you find any workaround?
Restructure the project to include all the resources in the root Resources folder. Or refactor the folder name to something else
Relevant log output
No response
The text was updated successfully, but these errors were encountered: