My PowerShell upgraded to the new PowerShell 7.2.0 and it happened automatically since I get PowerShell from the Windows Store. However, my fancy prompt use PSReadLine with Predictive Autocomplete stopped working suddenly.
However, suddenly I started getting this error on every prompt.
Could not load type 'System.Management.Automation.Subsystem.PredictionResult' from assembly 'Microsoft.PowerShell.PSReadLine.Polyfiller, Version=184.108.40.206, Culture=neutral, PublicKeyToken=null'.
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
Well, you can see I’m using a Beta of PSReadLine 2.2:
But I have failed to keep it up to date, and when I got into this state, I realized just because my prompt wasn’t pretty (momentarily) I could update it with one line while still staying on the Beta Train.
Install-Module PSReadLine -AllowPrerelease -Force
Now I’m on 2.2.0-beta4 and all is well and I have my cool prediction history back!
Sponsor: Couchbase Capella DBaaS is flexible, full-featured and fully managed with built-in access via K/V, SQL and full text search. It’s blazing fast, yet surprisingly affordable. Try Capella today for free.