vscode-powershell: Unable to start PowerShell extension on Windows without PS 6+ installed
Hi there,
After the the extension upgrade to 2019.9.0, I started to get the following error
30/09/2019 11:02:49 [NORMAL] - Visual Studio Code v1.38.1 64-bit
30/09/2019 11:02:49 [NORMAL] - PowerShell Extension v2019.9.0
30/09/2019 11:02:49 [NORMAL] - Operating System: Windows 64-bit
30/09/2019 11:02:49 [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
30/09/2019 11:03:15 [ERROR] - <ConsoleFeature>: Unable to instantiate; language client undefined.
Installed the previous version 2019.5 and was able to load the integrated terminal and run PS cmdlets
VERBOSE:
#-- Console Encoding ---------------------------------------------------------
VERBOSE: System.Text.ASCIIEncoding
VERBOSE:
#-- Updated PSModulePath to: -------------------------------------------------
VERBOSE: C:\Users\mohamed\Documents\WindowsPowerShell\Modules
VERBOSE: C:\Program Files\WindowsPowerShell\Modules
VERBOSE: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
VERBOSE: c:\Users\mohamed\.vscode\extensions\ms-vscode.powershell-2019.5.0\modules
VERBOSE:
#-- Check required modules available -----------------------------------------
VERBOSE: Testing module availability PowerShellGet
VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2\PSModule.psm1'.
VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.1.4\PSModule.psm1'.
VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.4\PSModule.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1'.
VERBOSE: PowerShellGet found
Versions
> code --list-extensions --show-versions
akamud.vscode-theme-onedark@2.1.0
bmuskalla.vscode-tldr@1.0.0
CoenraadS.bracket-pair-colorizer@1.0.61
Darfka.vbscript@1.0.4
DougFinke.vscode-PSStackoverflow@0.0.2
eamodio.gitlens@10.0.1
formulahendry.code-runner@0.9.14
ms-vscode-remote.remote-wsl@0.39.5
ms-vscode.powershell@2019.9.0
Shan.code-settings-sync@3.4.3
Tyriar.shell-launcher@0.3.0
> code -v
1.38.1
b37e54c98e1a74ba89e03073e5a3761284e3ffb0
x64
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 22 (5 by maintainers)
Hi, I ran into the same issue yesterday, the issue suddenly appeared. I could no longer run PS commands in VSCode with the PS extension, although I tried to reconfigure it properly. My solution was to upgrade PS 6.2.x to PS 7.0. Then it worked again. dotnet tool update --global PowerShell Tool ‘powershell’ was successfully updated from version ‘6.2.3’ to version ‘7.0.0’. https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools hth! br, Toni
Thanks, I forgot about that GUI prompt.
I’ve verified it also works w/ PoSh 7 (Preview 4), without 6 installed.