Share via

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

Apr 15, 2022, 3:17 AM

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:

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

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.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,362 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Riccardo D'Angelo 16 Reputation points
    May 5, 2022, 7:05 AM

    When the problem is caused from too long path inside zip file, should be enough change the environment vars of TEMP folder. I solved my issue in this way.
    Right-click My Computer > Properties. Click Advanced System Settings > Environment Variables. Select the TEMP variable and click Edit and put a short path, eg c:\tmp

    2 people found this answer helpful.

  2. Emanuele DI EMANUELE 1 Reputation point
    Oct 18, 2024, 8:06 AM

    I tried all but I still have this issue:

    Proprietà di compilazione per C:\GitRepos\xxx\xx\xx\xx.csproj: VisualStudioProcessId: 31472, SolutionPath: C:\xx\xx\xx.xx\xx.xx.sln, SolutionName: xx.xx, RunConfiguration: Default, ArchiveOnBuild: False, ArchivePath: , IsAppDistribution: False, DeviceSpecificBuild: false, TargetiOSDevice: , _iOSRuntimeIdentifier: ios-arm64, IsHotRestartBuild: False, MessagingVersion: 18.0.8303, _DotNetRootRemoteDirectory: /Users/emanuelediemanuele\Library\Caches\Xamarin\XMA\SDKs\dotnet/, DotNetRuntimePath: /usr/local/share/dotnet/dotnet, ServerSshPort: 22, ServerTcpPort: 51197, ServerUser: xx, ContinueOnDisconnected: False, ServerAddress: 192.168.1.32

    Non è possibile creare un archivio iOS 'xx'. Non è possibile eseguire il processo in un server XMA.

    errore imprevisto dell'attività "Unzip".

    System.NotSupportedException: Il formato del percorso specificato non è supportato.

    in System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)

    in System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)

    in 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:riga 205

    in 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:riga 104

    in Xamarin.MacDev.Tasks.Unzip.ExecuteLocally() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/Unzip.cs:riga 76

    in Xamarin.MacDev.Tasks.Unzip.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/Unzip.cs:riga 53

    in Microsoft.Build.BackEnd.TaskExecutionHost.Execute()

    in Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

    Non è stato possibile creare l'archivio app 'xx'.

    please help :)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.