Deploy to remote iphone fails #28585
-
I have a .Net Maui app (9.0.14) built in vs2022 (updated to 17.13.4 today) which works fine on local dev machine, in ios simulator, android simulator and windows machine. I'm frustrated that I can't get the app icon to display if I deploy to a local iPhone (it always shows the default purple .Net icon) even though it works fine on the simulators, as I want to demo it to some people. So I try to deploy to iphone connected to paired Mac. The device shows up correctly, but when I build in VS2022 I get the following message: clang++ exited with code 1: Can anyone help here? This has been happening ever since I first tried it weeks ago. I've been waiting to see whether any "updates" might fix the problem, so I'm now running Xcode 16.2, Sequoia 15.3.2 etc. However, this failure was occurring on all previous versions |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
PS I'm running VS2022 on a Surface PRO with an Intel Core Ultra 7 266V 2.20 GHz processor and Windows 11 Pro. I just spotted the "ios-arm64" part of the "empty file", and am assuming it refers to the target phone device and is not a remnant of the Snapdragon processor I used to use, but got rid of very quickly? |
Beta Was this translation helpful? Give feedback.
-
Having also asked this question on a Microsoft forum, I have finally solved it, albeit in an unsatisfactory manner. I tried all linker options to no avail. I also tried a basic Hello World application and received exactly the same error when trying to deploy to my phone connected to the paired Mac, even though it worked fine in all simulators and via a local usb connection on the Windows dev machine.. However, I finally read the error message and paid attention to the filenames. Sure enough, the file libmono-component-marshal-ilgen-static.a was showing as Zero Bytes on the Mac, but 199 bytes on my Windows machine. So I manually copied it from the Windows machine to the appropriate place on the Mac, overwriting the empty file, and it all started working. While this HAS fixed my problem, it seems like there must be some error in the Maui process, as this doesn't feel like a "normal" dev requirement! Note that I had to copy the file for each app, not just once for all. |
Beta Was this translation helpful? Give feedback.
Having also asked this question on a Microsoft forum, I have finally solved it, albeit in an unsatisfactory manner.
I tried all linker options to no avail. I also tried a basic Hello World application and received exactly the same error when trying to deploy to my phone connected to the paired Mac, even though it worked fine in all simulators and via a local usb connection on the Windows dev machine..
However, I finally read the error message and paid attention to the filenames. Sure enough, the file libmono-component-marshal-ilgen-static.a was showing as Zero Bytes on the Mac, but 199 bytes on my Windows machine. So I manually copied it from the Windows machine to the appropriate place o…