My PowerShell upgraded to the brand new PowerShell 7.2.0 and it occurred mechanically since I get PowerShell from the Home windows Retailer. Nevertheless, my fancy immediate use PSReadLine with Predictive Autocomplete stopped working out of the blue.
Nevertheless, out of the blue I began getting this error on each immediate.
Couldn't load sort 'System.Administration.Automation.Subsystem.PredictionResult' from meeting 'Microsoft.PowerShell.PSReadLine.Polyfiller, Model=126.96.36.199, Tradition=impartial, PublicKeyToken=null'.
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
Effectively, you’ll be able to see I am utilizing a Beta of PSReadLine 2.2:
However I’ve did not hold it updated, and once I received into this state, I spotted simply because my immediate wasn’t fairly (momentarily) I may replace it with one line whereas nonetheless staying on the Beta Practice.
Set up-Module PSReadLine -AllowPrerelease -Power
Now I am on 2.2.0-beta4 and all is effectively and I’ve my cool prediction historical past again!
Sponsor: Couchbase Capella DBaaS is versatile, full-featured and absolutely managed with built-in entry by way of Okay/V, SQL and full textual content search. It’s blazing quick, but surprisingly inexpensive. Strive Capella at the moment at no cost.
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, advisor, father, diabetic, and Microsoft worker. He’s a failed stand-up comedian, a cornrower, and a ebook writer.