WhyAlfred
WhyAlfred

Reputation: 39

Error trying to publish .net maui app iOS version using Visual Studio on Windows

I'm developing an application in .Net Maui for iOS and Android. For Android all is good but I have some problems with iOS. I linked windows pc with a VMWare machine where I put on macOSVentura with xcode and visual studio installed. The debug mode works correctly.

I followed this tutorial for publish the app but when I try to publish it I got this error:

Error   MSB4018 The "ReadItemsFromFile" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Xamarin.Messaging.Exceptions.MessagingException: A timeout occurred on client build258046576mtq28 while executing a post for topic xma/agents ---> System.TimeoutException: The operation has timed out.
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__21`2.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Client\MessagingClient.cs:line 188
   --- End of inner exception stack trace ---
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__21`2.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Client\MessagingClient.cs:line 239
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Xamarin.Messaging.Ssh.MessagingRunnerPro.<ExecuteWithRetryAsync>d__12`1.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingRunnerPro.cs:line 55
--- End of stack trace from previous location where exception was thrown ---

(the error was much longer)

If I try to execute the command in PowerShell as in the guide I got this error

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.2.2054\tools\msbuild\iOS\Xamarin.Shared.targets(1738,3): error : Could not find Microsoft.iOS in /Users/username/Library/Caches/Xamarin/XMA/SDKs/dotnet/packs/
Microsoft.iOS.Sdk/16.2.2054/. [C:\Users\localusername\source\repos\appname\appname\appname.csproj::TargetFramework=net7.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.2.2054\tools\msbuild\iOS\Xamarin.Shared.targets(1738,3): error :          
[C:\Users\localusername\source\repos\appname\appname\appname.csproj::T
argetFramework=net7.0-ios]

I also tried to follow the Microsoft guide : but I got this error

I guess I created correctly every Application documents as in both tutorial, I also downloaded this file 'Worldwide Developer Relations - G3 (Expiring 02/20/2030 00:00:00 UTC)' in my macOS.

Any solution?

Upvotes: 1

Views: 1314

Answers (1)

Spack09
Spack09

Reputation: 232

I had a similar error. Try to keep attention on the info.plist file if you added something wrong (for example on the map) fix the request or delete it if you don't need it. Then try again. If it still doesn't work, try passing the project into the VM and publishing it from the visual studio inside the mac. This worked for me.

Upvotes: 1

Related Questions