Maui Archive Manager is empty after successful build

Tobias Schroer 20 Reputation points
2023-03-14T11:02:39.0266667+00:00

I'm trying to publish an iOS app (AdHoc) with Visual Studio 2022 (win 64bit, v17.5.1)). My solution is in maui, .net 7 and targets Android and iOS. I use a Mac mini as a buildserver with all updates installed, xcode is at 14.2. I use an iPod Touch 7th gen, that is also up to date, as a remote device.

But whatever I do, my archive manager is always empty. After I click publish the archive manager opens and it says "archiving" with a green progress bar. After some time the text changes to "App archive 'My App' completed successfully, but the progress bar keeps on going. If I then close and reopen the archive manager, I can't see the archive at all.

At AppData\Local\Xamarin\iOS\Archives I can see that the archive indeed was build, so the error is only that visual studio doesnt show the archive.

I never changed the archives location in the Xamarin --> iOS Settings. It is at C:\Users\MyUser\AppData\Local\Xamarin\iOS\Archives

What might be a problem: I also use VS2019 and have archived and published another app, which is still in Xamarin. Maybe this is why VS2022 gets confused...

What I already did for trouble shooting:

  1. Checked that the Entitlements.plist exists and is correct
  2. Checked that the correct certificate and provisioning profile is chosen at project settings at bundle signing
  3. Checked that the .csproj file is correct and refers to the correct signing certificate and provisioning profile
  4. Checked that the app identifier is the same at every place you can set it.
  5. Checked that the Info.plist is correct and includes CFBundleShortVersionString and CFBundleVersion
  6. Deleted bin and obj folders for the solution
  7. Deleted everything inside AppData\Local\Xamarin folder
  8. Restart PC and Mac
  9. Open VS2022 on windows pc, connect to mac.
  10. Add my Apple Developer account at tools --> options --> Xamarin --> Apple accounts. Then add the distribution certificate. It is shown as valid. Then download the provisioning profiles
  11. Clean solution
  12. Build
  13. Publish
  14. After some time, it says "archive completed successfully, but the progress bar doesn't stop
  15. After closing and reopening the archive manager, it says "no archive builds available"
  16. But the archive is at AppData\Local\Xamarin\iOS\Archives\2023-03-14\My-App 3-14-23 11.26 AM.xcarchive, with a dSYMs and a Products folder and the correct Info.plist
    The whole folder is 163MB

Update: archiving for Android yields the same result. The archive is build and I can find it via the explorer, but the archive manager is stil empty.

Developer technologies | .NET | .NET MAUI
Developer technologies | Visual Studio | Other
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,436 Reputation points Microsoft External Staff
    2023-03-16T03:02:56.05+00:00

    Hello,

    As you @Tobias Schroer said, it works for you: open Xcode, go to Window->Organizer->Archives, then check if the archive file exists and try to click the Distribute App button to continue.

    For this, you have to switch to the mac. It's recommended that you report the problem with Visual Studio, please see Report a problem with Visual Studio - Visual Studio (Windows) | Microsoft Learn

    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.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Alexander Kofanov 5 Reputation points
    2023-03-17T15:20:48.8133333+00:00

    I have the same problem with VS 17.5.2
    In fact .aab file is generated but Archive Manager is empty.

    If you need to sign your .aab file for Google Play - you can achieve it without Archive Manager:

    1. Find and copy your .keystore file from C:\Users\username\AppData\Local\Xamarin\Mono for Android\Keystore\yourkeystorename\yourkeystorename.keystore to C:\
    2. Find and copy your .aab file from C:\Users\username\AppData\Local\Xamarin\Mono for Android\Archives...etc... to C:\
    3. Run this command: jarsigner -keystore C:\myfile.keystore C:\mybundle.aab mykeystorealias
    4. Enter password for keystore

    Hope it will help.

    Sorry 4 bad English.

    1 person found this answer helpful.

  2. SuperMindConsulting 5 Reputation points
    2025-01-15T05:36:18.5333333+00:00

    I ran into this same issue and after a few hours of troubleshooting and "trial and error" adventures here is what fixed the "No Archive builds available" issue on one of our dev machines.

    Archive Manager was not showing any historical or new archives for the current solution.

    Would not show any archives for iOS and Android.

    (affected all projects on the dev machine)

    TLDR: Rename "\AppData\Local\Xamarin" folder and let VS will recreate it.... I say rename so you can salvage historical settings/files.....read details below.

    Make sure you don't leave remnants of extracted ipa's inside the Xamarin Archive folders or any other files that may trip up VS parser. Apparently, Visual Studio has some issues when trying to parse the directory tree when trying to display the "Archive Manager" screen. So keep them clean, folks.

    This may not be the same case for everyone, but I thought it may save some hours of time for someone.

    VS 2022 Professional - Version 17.12.3 and Version 17.12.3

    These did NOT work....

    • Created a new MAUI project as a baseline, but still had same issues as other projects.
    • Repair VS
    • Rollback VS
    • Upgrade VS (Luckily a new build just popped up during my troubleshooting, since I was already on the most recent)
    • Messing with Keystore like some posts had recommended
    • Rebuild Intellisense
    • Change Xamarin output folders
    • Reinstall Android SDK Manager
    • Deleting and allowing VS to recreate "Android\android-sdk" folder

    This actually worked...

    "\AppData\Local\Xamarin"

    Rename the Xamarin folder to allow VS to recreate the folder.

    This fixed the problem, great...right?

    Not exactly. I wanted to preserve historical builds and previous settings and keystores.

    So I used a backup and started whacking folders one at a time and allowed VS to recreate them...

    Finally, I traced it down to one of my iOS datetime stamped folders under "Xamarin\iOS\Archives"

    There was an "extracted" ipa subfolder. Apparently, the dev was inspecting an ipa file for another issue and left these files. Once I deleted this subfolder, all was good again.

    If this didn't help you, good luck with the battle...

    1 person found this answer helpful.
    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.