Skip to content

The 'powerShellDefaultVersion' setting was 'PowerShell (x64)' but this was not found! #4669

@TESTER-sec

Description

@TESTER-sec

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

  1. Run PowerShell Command Explorer
  2. Doing Step 1 above generates the following errors and logs:

7/20/2023 1:05:39 AM [NORMAL] - Visual Studio Code: v1.80.1 64-bit on Windows 64-bit
7/20/2023 1:05:39 AM [NORMAL] - PowerShell Extension: v2023.6.0
7/20/2023 1:05:39 AM [WARNING] - The 'powerShellDefaultVersion' setting was 'PowerShell (x64)' but this was not found! Instead using first available installation 'Windows PowerShell (x64)' at 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe'!
7/20/2023 1:05:39 AM [NORMAL] - Starting 'Windows PowerShell (x64)' at: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
7/20/2023 1:05:39 AM [NORMAL] - PowerShell process started with PID: 9080

  1. The PowerShell Command Explorer never loads; VSCode hangs at:

image

image

[Warn - 1:10:41 AM] OmniSharp.Extensions.LanguageServer.Server.LspServerOutputFilter: Tried to send request or notification before initialization was completed and will be sent later OmniSharp.Extensions.JsonRpc.RequestCancelled | @request='OmniSharp.Extensions.JsonRpc.RequestCancelled'
[Error - 1:13:26 AM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 1:13:26 AM] Connection to PowerShell Editor Services (the Extension Terminal) was closed. See below prompt to restart!
[Error - 1:13:26 AM] PowerShell Editor Services client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.22621.1778
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.1778
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visual Studio Code Version

1.80.1
74f6148eb9ea00507ec113ec51c489d6ffb4b771
x64

Version: 1.80.1 (system setup)
Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771
Date: 2023-07-12T17:22:07.651Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621

Extension Version

ms-vscode.powershell@2023.6.0

Steps to Reproduce

  1. Install latest version of VSCode
  2. Install latest version of VSCode PowerShell extension
  3. Attempt to update the PowerShell Command Explorer

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions