Skip to content

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' #3020

@andrehe001

Description

@andrehe001

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

### Environment
PSReadLine: 2.2.0-beta2
PowerShell: 7.2.0
OS: Microsoft Windows 10.0.19042
BufferWidth: 160
BufferHeight: 9001

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()
   at Microsoft.PowerShell.PSConsoleReadLine.Prediction.Reset()
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)


### Screenshot

![PS_Exepction_Screenshot](https://user-images.githubusercontent.com/13762183/141436390-2628ac76-1ff7-4640-952d-56411da9cc6e.jpg)


### Environment data

```console
### Environment
PSReadLine: 2.2.0-beta2
PowerShell: 7.2.0
OS: Microsoft Windows 10.0.19042
BufferWidth: 160
BufferHeight: 9001

Steps to reproduce

Installed Powershell 7.2.0. Running it either stand-alone or with Terminal

Expected behavior

No exepction

Actual behavior

The above exeption happens everytime running Powershell 7.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions