Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - System.TypeLoadException: Could not load type 'System.Management.Automation.Subsystem.PredictionResult #3901

Closed
3 tasks done
edbakermct opened this issue Dec 14, 2023 · 3 comments

Comments

@edbakermct
Copy link

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

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.3.10
OS: Microsoft Windows 10.0.22621
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()
   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)

I cannot uninstall 7.1.3 andf have installed later versions but they wont run due to this error
would appreciate assistance to remove this version so i can run PoSh

Cannot taker a screenshot as this happens when the terminal loads

I cant run the nvironment script - the systrem is non responsive from start



### Screenshot

no screenshot

### Environment data

```console
7.1.3

Steps to reproduce

start terminal in powershell 0or just run powershell 7 in a command window always happens

Expected behavior

system ruins correctly

Actual behavior

i always get thgis error

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Dec 14, 2023
Copy link

This issue was fixed in 2.2.0-beta3 version of PSReadLine. You can fix this by upgrading to the latest 2.3.4 version of PSReadLine.
To upgrade, simply run Install-Module PSReadLine -AllowPrerelease -Force from your PowerShell console.


If you want to remove that beta version of PSReadLine and use the 2.1.0 version of PSReadLine that's shipped with PowerShell 7.2, you can:

  1. run pwsh -noprofile -noninteractive to start pwsh without loading PSReadLine
  2. run Uninstall-Module -Name PSReadLine -RequiredVersion <2.2.0-beta1 or 2.2.0-beta2> -AllowPrerelease to remove the module. Or, you can manually remove that module folder.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Dec 14, 2023
@edbakermct
Copy link
Author

none of those worked - the remove module didnt work so i deleted the folder in program files and that didnt work either,

@StevenBucher98
Copy link
Collaborator

Try upgrading to the latest version of PSReadLine, https://www.powershellgallery.com/packages/PSReadLine/2.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants