This guide explains how to create a console app that uses Xamarin.Mac APIs. The trick is to reference Xamarin.Mac.dll
and link libxammac.dylib
in your project. But it is limited to the Mono runtime (pre-.NET-Core).
With .NET 6, there are now workloads and a new net6.0-macos
target runtime. However, this seems to assume that you are creating a GUI app rather than a console app.
When installing the workload in .NET 6, it seems to only install a reference assembly for Xamarin.Mac.dll
. So where is the real Xamarin.Mac.dll
for .NET 6? And is it possible to use it without targeting net6.0-macos
?