Microsoft.Maui.Platforms.MacOS 0.1.0-preview.10.26274.3

Prefix Reserved
This is a prerelease version of Microsoft.Maui.Platforms.MacOS.
dotnet add package Microsoft.Maui.Platforms.MacOS --version 0.1.0-preview.10.26274.3
                    
NuGet\Install-Package Microsoft.Maui.Platforms.MacOS -Version 0.1.0-preview.10.26274.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Maui.Platforms.MacOS" Version="0.1.0-preview.10.26274.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Maui.Platforms.MacOS" Version="0.1.0-preview.10.26274.3" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Maui.Platforms.MacOS" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Maui.Platforms.MacOS --version 0.1.0-preview.10.26274.3
                    
#r "nuget: Microsoft.Maui.Platforms.MacOS, 0.1.0-preview.10.26274.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.Maui.Platforms.MacOS@0.1.0-preview.10.26274.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Maui.Platforms.MacOS&version=0.1.0-preview.10.26274.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Maui.Platforms.MacOS&version=0.1.0-preview.10.26274.3&prerelease
                    
Install as a Cake Tool

.NET MAUI for macOS (AppKit)

A native .NET MAUI backend for macOS using AppKit — not Mac Catalyst.

This backend lets MAUI applications run as true native macOS apps that use AppKit controls (NSWindow, NSButton, NSScrollView, etc.) and follow standard macOS UI conventions (menu bar, toolbar, sidebar flyout, native dialogs, etc.).

Inspiration: Originally based on the shinyorg/mauiplatforms project. The Xamarin.Forms Xamarin.Forms.Platform.MacOS backend is also a useful historical reference for AppKit control mappings, although this project uses MAUI's modern handler architecture rather than the legacy renderer model.

Packages

Package Description
Microsoft.Maui.Platforms.MacOS Core handlers, hosting, platform services
Microsoft.Maui.Platforms.MacOS.Essentials MAUI Essentials implementations (clipboard, preferences, sensors, …)
Microsoft.Maui.Platforms.MacOS.BlazorWebView Blazor Hybrid (BlazorWebView) support

Prerequisites

  • .NET 10 SDK
  • macOS 14 (Sonoma) or later
  • Xcode command line tools (for sips / iconutil — used by the icon build target)

Quick start

# Install the template
dotnet new install Microsoft.Maui.Platforms.MacOS.Templates --prerelease

# Create a new macOS MAUI app
dotnet new maui-macos -n MyApp.MacOS
cd MyApp.MacOS
dotnet run

Option 2: Add to an existing project manually

1. Project file
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0-macos</TargetFramework>
    <OutputType>Exe</OutputType>
    <UseMaui>true</UseMaui>
    <SingleProject>true</SingleProject>
    <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>

    <ApplicationTitle>My macOS App</ApplicationTitle>
    <ApplicationId>com.example.myapp</ApplicationId>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
    <PackageReference Include="Microsoft.Maui.Platforms.MacOS" Version="*" />
    <PackageReference Include="Microsoft.Maui.Platforms.MacOS.Essentials" Version="*" />
  </ItemGroup>

  <ItemGroup>
    <MauiIcon Include="Resources\AppIcon\appicon.png" />
  </ItemGroup>
</Project>
2. Main.cs
using AppKit;

public class MainClass
{
    static void Main(string[] args)
    {
        NSApplication.Init();
        NSApplication.SharedApplication.Delegate = new MauiMacOSApp();
        NSApplication.Main(args);
    }
}
3. MauiMacOSApp.cs
using Foundation;
using Microsoft.Maui.Platforms.MacOS.Platform;

[Register("MauiMacOSApp")]
public class MauiMacOSApp : MacOSMauiApplication
{
    protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
4. MauiProgram.cs
using Microsoft.Maui.Platforms.MacOS.Hosting;
using Microsoft.Maui.Platforms.MacOS.Essentials;

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiAppMacOS<App>()
            .AddMacOSEssentials()
            .ConfigureFonts(fonts =>
            {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
            });

        return builder.Build();
    }
}
5. App.cs
public class App : Application
{
    protected override Window CreateWindow(IActivationState? activationState)
        => new Window(new MainPage());
}

Building / running the sample

dotnet build platforms/MacOS/MacOS.slnx
dotnet run --project platforms/MacOS/samples/MacOS.Sample/

MAUI DevFlow integration

The sample app supports the optional in-process MAUI DevFlow agent:

dotnet run --project platforms/MacOS/samples/MacOS.Sample/ -p:EnableMauiDevFlow=true

This exposes a local HTTP API and MCP server for inspecting the running app's visual tree, capturing screenshots, automating interactions, and more. See src/DevFlow/ and the maui-platform-backend skill's devflow-integration.md reference for details.

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0-macos26.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Microsoft.Maui.Platforms.MacOS:

Package Downloads
Microsoft.Maui.DevFlow.Agent

In-app agent for .NET MAUI automation. Exposes visual tree, element interactions, and screenshots via HTTP/JSON API.

Microsoft.Maui.DevFlow.Blazor

Enable browser developer tools and Playwright MCP automation for .NET MAUI Blazor Hybrid apps. Connects Chrome DevTools Protocol to BlazorWebView via Chobitsu.

Microsoft.Maui.Platforms.MacOS.BlazorWebView

Blazor Hybrid support for Microsoft.Maui.Platforms.MacOS — host Blazor components in a native macOS AppKit window using WKWebView.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.10.26274.3 69 5/24/2026
0.1.0-preview.9.26258.5 108 5/11/2026
0.1.0-preview.8.26256.5 71 5/6/2026