3

Running C# MAUI for Android/Windows and it build and runs well.

Now, i want to build and run for iOS but get problems.

When installed Visual studio for Mac, XCode on a Mac and using Pair to Mac I get this error:

Error dotnet validation failed, an unexpected error occurred No receiver was found for topic xvs/idb/initialize-dotnet-sdk

enter image description here

Someone got this problem?

Some details about the setups I have:

My developer computer, Windows 10:

Microsoft Visual Studio Community 2022

Version 17.4.3

VisualStudio.17.Release/17.4.3+33205.214

Microsoft .NET Framework

Version 4.8.04084

...

VisualStudio.Mac 1.0

...

Xamarin 17.4.0.312 (d17-4@be7e8d1)

Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

...

Xamarin.iOS and Xamarin.Mac SDK 16.1.1.27 (933c6c2c9)

Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

My Mac, MacOS Monterey 12.6.2

Microsoft Visual Studio for Mac 17.4.2 (Build 17)

...

.NET 6.0.12 (64-bit)

Architecture: X64

...

Apple Developer Tools

Xcode 14.2 (21534)

Build 14C18

...

Xamarin.Mac

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

...

Xamarin.iOS

Xamarin.iOS not installed.

Can't find mtouch or the Version file at

/Library/Frameworks/Xamarin.iOS.framework/Versions/Current.

Alexander
  • 471
  • 4
  • 18
  • 1
    A restart of Mac and Windows computer the specific error dissapeared, but now I get this error: Could not uninstall workload 'ios'. Details: Workload uninstallation failed: Couldn't find workload ID(s): ios – Alexander Jan 20 '23 at 14:56
  • I have this after my system is idle for a while. Rebooting all the time is a real pain. I wish I know what the magic-command was on the mac to reset/jiggle the xamarin/maui service.. – Geo... Feb 10 '23 at 18:33

2 Answers2

3

In my case Visual studio restart helped

Bohdan
  • 96
  • 3
  • Restarted all computers, and the last error with "Couldn't find workload ID(s): ios" I just restart visual studio and everything works... – Alexander Jan 20 '23 at 18:09
  • This isn't really an answer, it's a work-around. Everyone knows step one is reboot and see if the problem goes away. But it would be nice to understand what is fouled up on the Mac, so the process could be killed/reset/etc. – Geo... Feb 10 '23 at 18:32
0

What version is your Maui project, .Net 6 or .Net 7? If it is .Net 7. You need to install the latest Visual Studio 2022 for Mac version 17.5 Preview on your Mac. You can also check the following:

1.You can also check whether your Mac is enabled for remote login (open System Preferences and go to the Sharing pane->Check Remote Login in the Service list- >configured to allow access for All users).

2.You can right-click your project and select Properties->iOS->Build->Linker behavior to check whether you have selected Link Framework SDKs Only.

3.According to your error

Xamarin.Mac not installed.

Xamarin.iOS not installed.

You can check whether Xamarin.iOS and Xamarin.Mac are installed on your Mac when installing VS.

For more details, you can refer to the official document:

Installation

Pair to Mac for iOS development

Zack
  • 1,255
  • 1
  • 2
  • 5