0

.NET MAUI stops at "--enable-serialization-discovery ~" when executing a release build for iOS.

I am building net6.0-android and net6.0-ios apps with .NET MAUI.
The development environment is Visual Studio(17.6.4) on Windows.
Mac is paired and iPad is connected.
Mac is 13.4.1 and Xcode is 14.3.1.

In the release build for iOS, after outputting the "--enable-serialization-discovery ~" log, nothing progresses even after an hour.

Please let me know if anyone else has had a similar problem and knows how to solve it.
I am trying to gather information because it is not efficient, although after several tries I sometimes succeed.
Also, even if it succeeds, it sometimes takes more than 20 minutes, so if you know how to shorten the time, please let us know as well.

(This is an automatic translation, so sorry if it doesn't make sense)

What we tried to solve:

  • After closing Visual Studio on Windows, delete /Users/(user)/Library/Caches/Xamarin/XMA on Mac and start Visual Studio on Windows.
  • Delete the obj and bin of the app project.
  • Restart Windows and Mac.

PS:
I checked the log report in the Mac console and found a "System.Net.Sockets.SocketException" in the Broker log. Why?

Is it due to the output of "xxxx.Broker.xxx.stderr.log" (no content) in the Broker's log?

Is AOT compilation taking a long time on a paired Mac? I can't tell if I'm making progress or not without being able to check progress.

5
  • May I know what is your version of Visual Studio on Windows? Could you please upgrade it to the latest one to try if it works? Commented Jul 20, 2023 at 5:56
  • Thank you for your comment.The version of Visual Studio on Windows is 17.6.4.I just checked and the latest is 17.6.5, so I will update and try it. Commented Jul 21, 2023 at 0:33
  • @AlexandarMay-MSFT I updated Visual Studio on Windows to 17.6.5 with the same results. Commented Jul 21, 2023 at 1:56
  • 1. You can check if the device is in Devices list at developer.apple.com. And you could try to check if this iPad is included in the profile. 2. In your windows PC, can you try to Pair to Mac, use Automatic Mac provisioning, then choose iOS Remote Devices to see if it works? Commented Jul 24, 2023 at 7:30
  • @AlexandarMay-MSFT Release builds are not entirely impossible, so certificates, IDs, devices, and provisioning profiles are already registered. The provisioning configuration is done manually, does it need to be automatic? I set the Visual Studio log level to "Diagnostic" and checked the logs. When the release build failed, it printed Client 'Build16460' status changed to Disconnected. Repeatedly deleting XMA and mtbs, restarting the Mac, and restarting Visual Studio on Win, it succeeded even. (1 success out of 5 times) Commented Jul 25, 2023 at 9:52

1 Answer 1

0

It appears that this was due to the fact that the linker was set to "Linker behavior: do not link" in the release build. This was causing build times to lengthen, leading to timeouts. Previously (version unknown), there was a problem where builds could not be performed unless "No Linking" was set, but this problem has now been resolved. It may not be a fundamental solution, but since we were able to release the application successfully, we consider it resolved.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.