laptop and a wrench

Bug

The MapView.Print() method returns the "System.NullReferenceException: 'Object reference not set to an instance of an object.'" and "System.Exception: 'Print service failure: Object reference not set to an instance of an object.'" exceptions when called normally.

ArcGIS Pro SDK for .NET
Bug ID Number BUG-000167134
SubmittedApril 30, 2024
Last ModifiedJune 27, 2025
Applies toArcGIS Pro SDK for .NET
Version found3.2
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusAs Designed

Additional Information

The older SDK MapView.Print(printerSettings) function was marked obsolete and was replaced by a new MapView.Print(printerSettingInfo) or Layout.Print(printerSettingInfo, MapSeriesOptions) function. Here are some snippets: PrinterSettingsInfo info = new PrinterSettingsInfo(); var printerSettings = info.PrinterSettings; printerSettings.PrinterName = "some printer name"; printerSettings.DefaultPageSettings.Landscape = false; printerSettings.Copies = 1; info.DoShowSelectionSymbology = false; info.LayoutOrMapName = layout.Name; layout.Print(info);

Workaround

Use the new Pro 3.5 MapView.Print(printerSettingInfo) or Layout.Print(printerSettingInfo, MapSeriesOptions) functions.

Steps to Reproduce

Bug ID: BUG-000167134

Software:

  • ArcGIS Pro SDK for .NET

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options