ShowPrintDialog Behavior on Unsupported Target Frameworks
ShowPrintDialog and ShowPrintDialogAsync require a UI component to display a print dialog. They are not supported on target frameworks that lack UI capability, such as plain .NET Core or .NET Standard builds.
Calling either method on an unsupported TargetFramework may raise an error resembling the following:
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.
Solution
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.

