Powershell 7.2 and Windows Terminal #14016

Closed
opened 2026-01-31 03:58:34 +00:00 by claunia · 5 comments
Owner

Originally created by @KrisCarr on GitHub (May 28, 2021).

Windows Terminal version (or Windows build number)

10.0.19043.1023

Other Software

Powershell 7.2.0-preview.6
Windows Terminal Preview Version: 1.9.1445.0

Steps to reproduce

Open Powershell 7.2.0-preview.6 in Windows Terminal.

This error does not happen if Powershell is opened on its own from the start menu.

JSON is simply:

{
    "guid": "{a3a2e83a-884a-5379-baa8-16f193a13b21}",
    "hidden": false,
    "name": "PowerShell 7 Preview",
    "source": "Windows.Terminal.PowershellCore",
    "fontFace": "Cascadia Code PL"
},

Expected Behavior

The terminal prompt.

Actual Behavior

The following error in the console window instead of the expected prompt:

Environment

PSReadLine: 2.2.0-beta1
PowerShell: 7.2.0-preview.6
OS: Microsoft Windows 10.0.19043
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() in Microsoft.PowerShell.PSReadLine2.dll:token 0x60004a6+0x0
   at Microsoft.PowerShell.PSConsoleReadLine.Prediction.Reset() in Microsoft.PowerShell.PSReadLine2.dll:token 0x6000478+0x7
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000f2+0x118
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000eb+0x60
Originally created by @KrisCarr on GitHub (May 28, 2021). ### Windows Terminal version (or Windows build number) 10.0.19043.1023 ### Other Software Powershell 7.2.0-preview.6 Windows Terminal Preview Version: 1.9.1445.0 ### Steps to reproduce Open Powershell 7.2.0-preview.6 in Windows Terminal. This error does not happen if Powershell is opened on its own from the start menu. JSON is simply: ``` { "guid": "{a3a2e83a-884a-5379-baa8-16f193a13b21}", "hidden": false, "name": "PowerShell 7 Preview", "source": "Windows.Terminal.PowershellCore", "fontFace": "Cascadia Code PL" }, ``` ### Expected Behavior The terminal prompt. ### Actual Behavior The following error in the console window instead of the expected prompt: ### Environment PSReadLine: 2.2.0-beta1 PowerShell: 7.2.0-preview.6 OS: Microsoft Windows 10.0.19043 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() in Microsoft.PowerShell.PSReadLine2.dll:token 0x60004a6+0x0 at Microsoft.PowerShell.PSConsoleReadLine.Prediction.Reset() in Microsoft.PowerShell.PSReadLine2.dll:token 0x6000478+0x7 at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000f2+0x118 at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000eb+0x60 ```
claunia added the Needs-TriageNeeds-Tag-FixNeeds-AttentionProduct-Powershell labels 2026-01-31 03:58:34 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 28, 2021):

I can't imagine why the Terminal would affect this - is it possible there's an architecture mismatch?

Have you reported this on the Powershell repo? (https://github.com/powershell/powershell)? I'm positive they'd be more capable of investigating this than we would.

@zadjii-msft commented on GitHub (May 28, 2021): I can't imagine why the Terminal would affect this - is it possible there's an architecture mismatch? Have you reported this on the Powershell repo? (https://github.com/powershell/powershell)? I'm _positive_ they'd be more capable of investigating this than we would.
Author
Owner

@KrisCarr commented on GitHub (May 28, 2021):

@zadjii-msft After some reboots Powershell is now failing directly with the same error, I'll ask over there and see if they can help, it does look like this issue has already popped up on their tracker since. https://github.com/PowerShell/PowerShell/issues/15482

It was an upgrade from an older version of PS7.2 and I guess it doesn't fully "apply" right away when opening it directly but opening it through Terminal was somehow thus only terminal was showing the error.

@KrisCarr commented on GitHub (May 28, 2021): @zadjii-msft After some reboots Powershell is now failing directly with the same error, I'll ask over there and see if they can help, it does look like this issue has already popped up on their tracker since. https://github.com/PowerShell/PowerShell/issues/15482 It was an upgrade from an older version of PS7.2 and I guess it doesn't fully "apply" right away when opening it directly but opening it through Terminal was somehow thus only terminal was showing the error.
Author
Owner

@mavaddat commented on GitHub (May 28, 2021):

@zadjii-msft After some reboots Powershell is now failing directly with the same error, I'll ask over there and see if they can help, it does look like this issue has already popped up on their tracker since. PowerShell/PowerShell#15482

It was an upgrade from an older version of PS7.2 and I guess it doesn't fully "apply" right away when opening it directly but opening it through Terminal was somehow thus only terminal was showing the error.

This is an issue with PowerShell/PSReadLine, not PowerShell. Notice issues https://github.com/PowerShell/PSReadLine/issues/2501 https://github.com/PowerShell/PSReadLine/issues/2498 https://github.com/PowerShell/PSReadLine/issues/2499 https://github.com/PowerShell/PSReadLine/issues/2482 https://github.com/PowerShell/PSReadLine/issues/2495

See here for more related issues.

@mavaddat commented on GitHub (May 28, 2021): > @zadjii-msft After some reboots Powershell is now failing directly with the same error, I'll ask over there and see if they can help, it does look like this issue has already popped up on their tracker since. [PowerShell/PowerShell#15482](https://github.com/PowerShell/PowerShell/issues/15482) > > It was an upgrade from an older version of PS7.2 and I guess it doesn't fully "apply" right away when opening it directly but opening it through Terminal was somehow thus only terminal was showing the error. This is an issue with [PowerShell/PSReadLine](../../../PowerShell/PSReadLine), not PowerShell. Notice issues https://github.com/PowerShell/PSReadLine/issues/2501 https://github.com/PowerShell/PSReadLine/issues/2498 https://github.com/PowerShell/PSReadLine/issues/2499 https://github.com/PowerShell/PSReadLine/issues/2482 https://github.com/PowerShell/PSReadLine/issues/2495 See [here](https://github.com/PowerShell/PSReadLine/issues?q=is%3Aissue+is%3Aopen+Could+not+load+type+%27System.Management.Automation.Subsystem.PredictionResult%27+from+assembly+%27Microsoft.PowerShell.PSReadLine.Polyfiller) for more related issues.
Author
Owner

@daxian-dbw commented on GitHub (May 28, 2021):

Thanks for reporting and using the preview version of PowerShell!
This is a duplicate of PowerShell/PSReadline#2495. The powershell-7.2.0-preview.6 contains a release note for this:

PSReadLine 2.2.0-beta1 and 2.2.0-beta2 do not work with this preview of PowerShell due to breaking changes in the prediction interface. The upcoming PSReadLine 2.2.0-beta3 release will resolve this. Use PSReadLine 2.1.0 as the temporary workaround.

@daxian-dbw commented on GitHub (May 28, 2021): Thanks for reporting and using the preview version of PowerShell! This is a duplicate of PowerShell/PSReadline#2495. The powershell-7.2.0-preview.6 contains a [release note](https://github.com/PowerShell/PowerShell/releases/tag/v7.2.0-preview.6) for this: > PSReadLine 2.2.0-beta1 and 2.2.0-beta2 do not work with this preview of PowerShell due to breaking changes in the prediction interface. The upcoming PSReadLine 2.2.0-beta3 release will resolve this. Use PSReadLine 2.1.0 as the temporary workaround.
Author
Owner

@DHowett commented on GitHub (May 28, 2021):

Thanks everyone!

@DHowett commented on GitHub (May 28, 2021): Thanks everyone!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14016