You can connect to a Mac Build host from your Windows machine without Visual Studio for Mac installed. All you need is to install the right packages, which are (luckily and for the time being), available to be downloaded separately. You just need to select the right versions that match your Visual Studio installation on Windows.
Of course, the first step is to install the .NET SDK. Head over to the .NET website and download the latest Release and/or Preview version.
As Xamarin and MAUI rely on the Mono framework, we also need to install it manually. I recommend the stable version. You’ll need to install it with right-click and selecting Open to unblock the installation file.
Install Xamarin packages
The next step involves installing the Xamarin packages needed for compilation. Without them installed, the connection attempt will always fail. Only with them installed, the connection process can install the needed additional packages.
Xamarin.iOS and Xamarin.Mac
The Xamarin.iOS and Xamarin.Mac packages can be found on GitHub:
Download and install the version that matches your Windows installation. In case you’re wondering about the Mac package – it seems to be a dependency for the build process. Only after installing it, I was able to connect from my VM.
If you want to use a local Android emulator installed on your Mac, like I described here, you will need to install the Xamarin.Android package as well. The installer is on GitHub as well:
You may need to download Android SDK tools as well:
Install MAUI workloads
If you want to compile .NET MAUI apps for the App Store, you will need to install also the MAUI workloads on your Mac. The process is well described in the Microsoft documentation:
Connect to the Mac
Once you have installed all the packages above, you should be able to connect with your Mac for compiling iOS applications:
Even though Microsoft is killing VS4Mac, we still are able to connect from Windows machines to a Mac build host. The process is done in less than an hour and just involves some package installations. Of course, there is always the alternative of using other IDEs like Rider or VS Code (.NET MAUI support is still beta as of writing this post). I recommend keeping the downloaded packages in a save place (just in case). As always, I hope this post is helpful for some of you.
Until the next post, happy coding!
Update 2023-09-29: Added Mono installation step