ShowPrintDialog Behavior in IronPrint (Post-2024.9)
ShowPrintDialog and ShowPrintDialogAsync no longer throw an exception when called on an unsupported target framework. As of version 2024.9, they log a warning and fall back to PrintAsync() instead.
Before this change, calling either method without a compatible TargetFramework raised the following error:
System.AggregateException: 'One or more errors occurred.
(Please try Print/PrintAsync since ShowPrintDialog/ShowPrintDialogAsync in NET Core or NET Standard,
it required UI component so please set more specific OS TargetFrameworks
e.g. net462; net472; net7.0-windows; net7.0-macos; net7.0-maccatalyst; net7.0-android)'
The dialog methods need a UI component, which is unavailable under plain .NET Core or .NET Standard targets. Earlier builds treated this as a hard failure and threw. The exception was disruptive at runtime, so the behavior was changed deliberately in 2024.9.
Solution
The fallback is automatic, but you can control which path runs by choosing the right target.
1. Rely on the Automatic Fallback
On an unsupported framework, the call now logs a warning and routes to PrintAsync() rather than throwing. Existing code keeps running without a crash, though no print dialog appears.
2. Target a UI-Capable Framework for the Dialog
To get the actual print dialog, build against an OS-specific target that includes UI support:
<TargetFrameworks>net462;net472;net7.0-windows;net7.0-macos;net7.0-maccatalyst;net7.0-android</TargetFrameworks>
<TargetFrameworks>net462;net472;net7.0-windows;net7.0-macos;net7.0-maccatalyst;net7.0-android</TargetFrameworks>
With one of these frameworks in place, ShowPrintDialog and ShowPrintDialogAsync display the dialog as expected.

