Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building MAUI for iOS stuck in endless _XamarinBuildDownloadCore task

Tags:

c#

ios

maui

I have a problem building an iOS App with .NET MAUI. When running dotnet build -f net8.0-ios, the App Builder starts and gets stuck in the Build Task _XamarinBuildDownloadCore. The time counter is still active and I cancelled the task after 4000 seconds.

I already did some research to narrow down the cause:

  • The cause for the problem seems to be the package Xamarin.Build.Download this is a transitive package of my used one Plugin.Firebase.CloudMessaging
  • It doesn't matter if the application is build with .NET 8.0 or 9.0 both versions have the same problem
  • I tried to build the application with parameter -bl to create a binary log, but since the build task never ends, the log is unfortunately unusable
  • This problem can be replicated with every new and clean project immediately after adding the package.

How to recreate the problem:

  • Create a new .NET Maui Project (from the template)
  • Run dotnet build -f net8.0-ios and everything runs fine
  • Add the Plugin.Firebase.CloudMessaging Package to your project
  • Run dotnet build -f net8.0-ios again, now the Build starts and proceed up to _XamarinBuildDownloadCore and nothing more happens. When you build your project from Visual Studio the Build Task just runs forever without any log.

So my questions are:

  • Does anybody else could determine such a behaviour?
  • Does anybody knows how to fix the problem?
  • If not do you have an idea what to do for further investigation?
like image 890
holg Avatar asked Oct 31 '25 14:10

holg


1 Answers

I found a work around for this issue (Windows 11) on the repo for dotnet Android (even tho it worked for iOS)

https://github.com/dotnet/android-libraries/issues/1047

For me, this issue came about after running into an issue with long file name limits on Windows. I followed these steps:

https://github.com/AdamEssenmacher/GoogleApisForiOSComponents?tab=readme-ov-file#windows--visual-studio-long-path-issue

...and when building the solution again it hung on building iOS at _XamarinBuildDownloadCore as well.

The work around is this:

  1. Go to the directory: C:\Users\[USER]\AppData\Local\XamarinBuildDownloadCache

  2. Look for GAppM-<version>.tgz and extract it. Make sure to extract it to the directory named GAppM-<version>. The directory already existed for me and I chose to overwrite it.

  3. In the XamarinBuildDownloadCache directory look for any file with .unpacked extension and make a copy of it, renaming it to GAppM-<version>.unpacked. It's just a flag file that tells the system it's done processing.

  4. Run your build again.

This worked for me, but if you need more info, check that first link for more details.

like image 67
Bungler Avatar answered Nov 03 '25 05:11

Bungler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!