dotnet/interactive

PowerShell: Formatter throws an exception on $null

Opened this issue · 0 comments

Describe the bug

If a PowerShell script or command has an output of $null, the formatter will throw this exception:

NullReferenceException: Object reference not set to an instance of an object.
Error: Command failed: SubmitCode: $null

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):
BuildInfo
AssemblyVersion: 1.0.0.0
BuildDate: 2025-07-01T22:20:37.6002647Z
AssemblyInformationalVersion: 1.0.632301+7d35ce3be7eb7a603527a3683b691d5e9922adca
AssemblyName: Microsoft.DotNet.Interactive.App

  • OS
    • [x ] Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • [x ] Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)