Skip to content

F1 key throws a terminating exception in PowerShell 7.6.0-preview.2 #4479

@matteocoder

Description

@matteocoder

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.yaml
Thank you!

### Environment
PSReadLine: 2.4.0-beta0+923a890f2e7ea10465f3a80a2bc030121a1c2f68
PowerShell: 7.6.0-preview.2
OS: Microsoft Windows 10.0.26100
BufferWidth: 120
BufferHeight: 24

Last 10 Keys:

 g e t - i t e m Spacebar F1

### Exception

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.PowerShell.Pager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Microsoft.PowerShell.Pager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Microsoft.PowerShell.PSConsoleReadLine.Microsoft.PowerShell.Internal.IPSConsoleReadLineMockableMethods.RenderFullHelp(String content, String regexPatternToScrollTo)
   at Microsoft.PowerShell.PSConsoleReadLine.WriteDynamicHelpContent(String commandName, String parameterName, Boolean isFullHelp)
   at Microsoft.PowerShell.PSConsoleReadLine.DynamicHelpImpl(Boolean isFullHelp)
   at Microsoft.PowerShell.PSConsoleReadLine.ShowCommandHelp(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)

Screenshot

Image

Environment data

PS Version: 7.6.0-preview.2
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.4.0-beta0
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 24

Steps to reproduce

  1. Open a new PowerShell session
  2. Write the name a command (for example Get-Item)
  3. Press F1

Expected behavior

The pager containing the command's documentation should appear.

Actual behavior

A terminating exception is thrown. Coincidentally, when trying to create a new [Microsoft.PowerShell.Pager] instance, PowerShell throws an InvalidOperation: Unable to find type [microsoft.powershell.pager]. error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions