Skip to content

System.TypeLoadException: Could not load type 'System.Management.Automation.Subsystem.PredictionResult' from assembly. #3407

@ghtsean

Description

@ghtsean

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

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

![WindowsTerminal_EaDX7bExVJ](https://user-images.githubusercontent.com/7505665/184555587-cc0a2142-f261-488a-a504-00a1f0bcb394.png)


### Environment data

```console
### Environment
PSReadLine: 2.2.0-beta1
PowerShell: 7.2.6
OS: Microsoft Windows 10.0.22000
BufferWidth: 120
BufferHeight: 30

Last 0 Keys

Steps to reproduce

Just start terminal and got this error.

Expected behavior

To open terminal without this issue.

Actual behavior

Exception by running terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions