IronPrint on macOS with .NET 8 (Apple Silicon)

Running IronPrint in a .NET 8 console app on Apple Silicon macOS can fail at build time with missing native libraries, and Printer.GetPrinterNamesAsync() throws at runtime.

System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.

macOS does not ship libgdiplus, the GDI+ implementation that IronPrint and System.Drawing depend on, and a plain net8.0 target never enables the macOS-specific platform APIs. Both gaps have to be closed.

Solution

1. Install the Native GDI+ Library

Install libgdiplus through Homebrew so the GDI+ support that Windows provides by default is available on macOS:

brew install mono-libgdiplus
brew install mono-libgdiplus
SHELL

Without this library, System.Drawing has no native backend to call into.

2. Target the macOS Framework

Point your .csproj at the macOS-specific target framework instead of plain net8.0:

<TargetFramework>net8.0-macos</TargetFramework>
<TargetFramework>net8.0-macos</TargetFramework>
XML

This tells .NET to use the macOS platform APIs rather than the cross-platform stubs.

Warningnet8.0-macos is not part of the default console app templates. Install the macOS workload or start from a macOS app template to get preconfigured support.

A complete project file looks like this:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0-macos</TargetFramework>
    <Nullable>enable</Nullable>
    <UseSystemDrawing>true</UseSystemDrawing>
  </PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0-macos</TargetFramework>
    <Nullable>enable</Nullable>
    <UseSystemDrawing>true</UseSystemDrawing>
  </PropertyGroup>
</Project>
XML

3. Use a Compatible Print API

On macOS, call ShowPrintDialogAsync() for print operations rather than relying on Windows-only printing paths.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 43,228 | Version: 2026.7 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPrint
run a sample watch your document hit the printer.