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.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,577 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,842 questions
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 25,996 Reputation points Microsoft Vendor
    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

1 additional answer

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.