Skip to content

PowerShell 7.2-Preview.7 bombs in Windows Terminal with System.TypeLoadException #15673

Description

Prerequisites

Steps to reproduce

Just did the automatic Windows update to PowerShell 7.2 Preview.7.
Posh_WU_2021-06-25_9-34-08

  1. Click on Wndows "Start", then on the PowerShell 7.2 Preview shortcut.
  2. Windows Terminal opens, but PowerShell ends with an System.TypeLoadException: System.TypeLoadException: Could not load type 'System.Management.Automation.Subsystem.PredictionResult' from assembly 'Microsoft.PowerShell.PSReadLine.Polyfiller, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Posh72prev72021-06-25_9-58-14

Expected behavior

To get to the PowerShell prompt without exceptions errors.

Actual behavior

trying to open PowerShell Preview:

PowerShell 7.2.0-preview.7
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\max_t>
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.md
Thank you!

### Environment
PSReadLine: 2.2.0-beta2
PowerShell: 7.2.0-preview.7
OS: Microsoft Windows 10.0.21390
BufferWidth: 120
BufferHeight: 30

Last 0 Keys
'''

'''

### Exception
'''
System.TypeLoadException: Could not load type 'System.Management.Automation.Subsystem.PredictionResult' from assembly 'Microsoft.PowerShell.PSReadLine.Polyfiller, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at Microsoft.PowerShell.PSConsoleReadLine.PredictionViewBase.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.PredictionInlineView.Reset() in Microsoft.PowerShell.PSReadLine2.dll:token 0x60004ca+0x0
   at Microsoft.PowerShell.PSConsoleReadLine.Prediction.Reset() in Microsoft.PowerShell.PSReadLine2.dll:token 0x600049b+0x7
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics) in Microsoft.PowerShell.PSReadLine2.dll:token 0x6000101+0x118
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000fa+0x60


### Environment data

```powershell
Microsoft Windows [Version 10.0.21390.2025]

Windows Terminal Preview: Version: 1.9.1523.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.Resolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions