Cannot create an IOS archive... Process cannot be executed on XMA server. There was an error unzipping the file... The specified path too long...

DLBrandt

New member
Joined
Apr 14, 2022
Messages
2
Programming Experience
10+
I am working on an update to a Xamarin.Forms app In Visual Studio Community 2022 on a Windows 11 Pro machine.

I receive the following error when I try to archive the iOS project for distribution:

C#:
Cannot create an IOS archive 'XXXXXXXX.iOS'. Process cannot be executed on XMA server.
There was an error unzipping the file C:\VSArchives\2022-04-13\31a2aedc.zip: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

I have been working on this for almost a week and need a new vector of attack. Please share if you have any suggestions.

  • Things I have tried already (separately and combined):
  • Enable Win32 Long Paths through Local Group Policy Editor
  • Changing iOS Archives location to drive root folder
  • Setting UseShortFileNames to True in my projects PropertyGroup (XXXXXXXX.iOS.csproJ)
  • Moving my solution folder to drive root
  • Cleaning Solution, Deleting all Bin/Obj folders, rebuilding solution
  • (Edit #1) Set LongPathsEnabled at HKLM\SYSTEM\CurrentControlSet\Control\FileSystem to 1 in Registry Editor

The archiving error began when I implemented Facebook Login using the Plugin.FacebookClient, which btw worked great except for this. When I remove this NuGet package and rem out the dependent code my solution archives again.

(Edit #2) A zip file is being created in my archives folder on my local machine (which I can unzip without issue), and the error message say the problem is unzipping on the XMA server. Does this suggest another way to address the issue?

Thank you!
 
Last edited:
Windows supports longer file paths but there are situations where they cannot be used in code. I'm not really sure what the specific rules are as I've never looked into it. What's happening is that one of the files in the archive is generating a file path that is longer than the specified limit. What you may be able to do is to extract the data to a folder with as short a path as possible, e.g. C:\X. Assuming that that works, you should then be able to move the files to another folder in File Explorer.
 
Windows supports longer file paths but there are situations where they cannot be used in code. I'm not really sure what the specific rules are as I've never looked into it. What's happening is that one of the files in the archive is generating a file path that is longer than the specified limit. What you may be able to do is to extract the data to a folder with as short a path as possible, e.g. C:\X. Assuming that that works, you should then be able to move the files to another folder in File Explorer.
Thank you. I did try that and it didn't solve the issue.

A zip file is being created in my archives folder on my local machine (which I can unzip without issue), and the error message says the problem is unzipping on the XMA server. Does this suggest another way to address the issue?
 
Sounds like a regression from the fix for the bug that was fixed in 2019:

 
Back
Top Bottom