Skip to content

PowerShell Session Menu failing to load #2822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
erwabo opened this issue Jul 21, 2020 · 1 comment
Closed

PowerShell Session Menu failing to load #2822

erwabo opened this issue Jul 21, 2020 · 1 comment

Comments

@erwabo
Copy link

erwabo commented Jul 21, 2020

@SeeminglyScience
logs.zip

System Details

System Details Output

### VSCode version: 1.46.1 cd9ea6488829f560dc949a8b2fb789f3cdc05f5d x64

### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]        
[email protected]
[email protected]       
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


### PSES version:

### PowerShell version:

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

Issue Description

The PowerShell Extesion for VS Code extension menu is not working properly. I randomly started getting Running the contributed command: 'PowerShell.ShowSessionMenu' failed and if I try to run a selection I get : Unable to instantiate; language client undefined.

Expected Behaviour

I should be able to select the PowerShell version I want to use in the session and also be able to run selection (F8)-

Actual Behaviour

I received the error in the @Description--

Attached Logs

[Trace - 5:09:38 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 7224,
"clientInfo": {
"name": "vscode",
"version": "1.46.1"
},
"rootPath": "c:\Users\ebojonell\source\repos\TF_Stage1-1",
"rootUri": "file:///c%3A/Users/ebojonell/source/repos/TF_Stage1-1",
"capabilities": {
"workspace": {
"applyEdit": true,
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
],
"failureHandling": "textOnlyTransactional"
},
"didChangeConfiguration": {
"dynamicRegistration": true
},
"didChangeWatchedFiles": {
"dynamicRegistration": true
},
"symbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
}
},
"executeCommand": {
"dynamicRegistration": true
},
"configuration": true,
"workspaceFolders": true
},
"textDocument": {
"publishDiagnostics": {
"relatedInformation": true,
"versionSupport": false,
"tagSupport": {
"valueSet": [
1,
2
]
}
},
"synchronization": {
"dynamicRegistration": true,
"willSave": true,
"willSaveWaitUntil": true,
"didSave": true
},
"completion": {
"dynamicRegistration": true,
"contextSupport": true,
"completionItem": {
"snippetSupport": true,
"commitCharactersSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"deprecatedSupport": true,
"preselectSupport": true,
"tagSupport": {
"valueSet": [
1
]
}
},
"completionItemKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
]
}
},
"hover": {
"dynamicRegistration": true,
"contentFormat": [
"markdown",
"plaintext"
]
},
"signatureHelp": {
"dynamicRegistration": true,
"signatureInformation": {
"documentationFormat": [
"markdown",
"plaintext"
],
"parameterInformation": {
"labelOffsetSupport": true
}
},
"contextSupport": true
},
"definition": {
"dynamicRegistration": true,
"linkSupport": true
},
"references": {
"dynamicRegistration": true
},
"documentHighlight": {
"dynamicRegistration": true
},
"documentSymbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"hierarchicalDocumentSymbolSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
}
},
"codeLens": {
"dynamicRegistration": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"typeDefinition": {
"dynamicRegistration": true,
"linkSupport": true
},
"implementation": {
"dynamicRegistration": true,
"linkSupport": true
},
"colorProvider": {
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true,
"rangeLimit": 5000,
"lineFoldingOnly": true
},
"declaration": {
"dynamicRegistration": true,
"linkSupport": true
},
"selectionRange": {
"dynamicRegistration": true
}
},
"window": {
"workDoneProgress": true
}
},
"trace": "verbose",
"workspaceFolders": [
{
"uri": "file:///c%3A/Users/ebojonell/source/repos/TF_Stage1-1",
"name": "TF_Stage1-1"
},
{
"uri": "file:///c%3A/Users/ebojonell/source/repos/TF_Stage2-1",
"name": "TF_Stage2-1"
},
{
"uri": "file:///c%3A/Users/ebojonell/source/repos/Terraform_Enterprise-1",
"name": "Terraform_Enterprise-1"
},
{
"uri": "file:///c%3A/Users/ebojonell/source/repos/Tenant_Config",
"name": "Tenant_Config"
},
{
"uri": "file:///c%3A/Users/ebojonell/source/repos/TerraformEnvironment",
"name": "TerraformEnvironment"
},
{
"uri": "file:///c%3A/Users/ebojonell/source/repos/OneStreamBuild-1",
"name": "OneStreamBuild-1"
},
{
"uri": "file:///c%3A/Users/ebojonell/source/repos/Terraform_POC",
"name": "Terraform_POC"
}
]
}

@ghost ghost added the Needs: Triage Maintainer attention needed! label Jul 21, 2020
@erwabo
Copy link
Author

erwabo commented Jul 22, 2020

I found a working solution for this here: #2544

The following steps solved this for me:

Exit VS Code
Rename C:\Program Files\PowerShell to C:\Program Files\PowerShell_
Open VS Code and wait for PS terminal to start. It should start v 5.1 now.
Click on the PS version icon (bottom right), and Switch to: Windows PowerShell (x86)
Once loaded, click on the icon again and Switch to: Windows PowerShell (x64)
Rename back C:\Program Files\PowerShell to C:\Program Files\PowerShell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants