How to Build .NET MAUI on Windows using a MacinCloud host

phil ciraolo 86 Reputation points
2022-07-05T22:28:27.58+00:00

Trying to build an iOS app from my Windows machine using a Paired Mac from MacinCloud. I'm using the following command from Terminal:

dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress={ip address} /p:ServerUser={userid} /p:ServerPassword={password} /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/{userid}/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:EnableAssemblyILStripping=false

Getting error on Windows:

...
Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Tool xcrun execution finished (exit code = 1).

ld: framework not found System
clang: error: linker command failed with exit code 1 (use -v to see invocation)

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.414\targets\Xamarin.Shared.Sdk.targets(1219,3): error : clang++ exited with code 1 [C:\Users\pcira\Desktop\AppName\AppName\AppName.csproj]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.414\targets\Xamarin.Shared.Sdk.targets(1219,3): error : [C:\Users\pcira\Desktop\AppNameAppName\AppName.csproj]

It looks like it can't find files on my Windows machine but I have confirmed they are indeed there.

Using VS2022 Version 17.3.0 Preview 2.0

The MacinCould host has the MAUI workloads installed and I can build an test app on the Mac.

Any suggestions on what and where to look?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,617 questions
{count} votes

1 answer

Sort by: Most helpful
  1. phil ciraolo 86 Reputation points
    2022-07-09T03:46:24.89+00:00

    The issue was found to be with the Microsoft.Indentity.Client package. It was not compatible with iOS. A new release was provided today and that fixed the issue. I can now archive an ipa using a MacinCloud hosted Mac Pro. Thanks for your help.

    1 person found this answer helpful.
    0 comments No comments