Maui ios publish : Path's format not supported

Cyril Auquier 0 Reputation points
2024-05-13T14:11:45.04+00:00

Hello,

I am encountering an issu when i am publishing, creating the archive of my maui application, i have the given error

16:02:09:546 Cannot create an IOS archive 'MT.TimeClean.Client.ForNative'. Process cannot be executed on XMA server. 16:02:09:546 The "Unzip" task failed unexpectedly. 16:02:09:546 System.NotSupportedException: The given path's format is not supported. 16:02:09:546 at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath) 16:02:09:546 at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) 16:02:09:546 at Xamarin.MacDev.CompressionHelper.TryDecompressUsingSystemIOCompression(TaskLoggingHelper log, String zip, String resource, String decompressionDir) in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Decompress.cs:line 200 16:02:09:546 at Xamarin.MacDev.CompressionHelper.TryDecompress(TaskLoggingHelper log, String zip, String resource, String decompressionDir, List`1 createdFiles, String& decompressedResource) in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Decompress.cs:line 104 16:02:09:546 at Xamarin.MacDev.Tasks.Unzip.ExecuteLocally() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/Unzip.cs:line 61 16:02:09:546 at Xamarin.MacDev.Tasks.Unzip.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/Unzip.cs:line 43 16:02:09:546 at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 16:02:09:546 at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

I already read some articles and it seems that there is an issue with the path length so i changed some:

  • the "TEMP" from environments variables that looks like something like this "C:\TEMP"
  • the "TMP" from environments variables that looks like something like this "C:\TEMP"
  • And the one where the xamarin archive are stored, and it looks like this now "C:\Archives"

Does someone know what i can do to resolve it?

Thanks!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,988 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 27,126 Reputation points Microsoft Vendor
    2024-05-16T03:21:15.1166667+00:00

    Hello,

    As a temp solution, please use VS for Mac and then archive and publish the app. See Publish a .NET MAUI iOS app for ad-hoc distribution - .NET MAUI | Microsoft Learn

    (Note: please use Xcode15.2)

    For the long path issue, please follow the progress at GitHub- Maui - some nugets do not work as path is too long "Could not find a part of the path" · Issue #17828 · dotnet/maui · GitHub

    and [iOS] Cannot create archive due to the "Unzip" task failing with System.NotSupportedException because the app package content includes the link to local drive · Issue #22359 · dotnet/maui · GitHub

    Thanks for your understanding.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments