-
Notifications
You must be signed in to change notification settings - Fork 510
PowerShellEditorServices not working on Windows 2012 R2 Servers. #2571
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
Comments
This is because Windows Server 2012R2 runs PowerShell 4 by default, which is no longer supported by the PowerShell extension. See #1310. Because of the way the extension loads, there's no way for us to improve the error message here unfortunately. Some workarounds:
We're doing work to enable development on client OS SKUs while providing compatibility checking for deployment SKUs. See this blog post for the work here so far. |
thanks for the quick response! can you tell me how to do this? |
I have a similar issue. I also have Window Server 2012-R2 but I have upgraded to WMF 5.1 as part of the VM OS image. I get the same error message as above. Is PowerShell v7 required to be installed, I did not see a prereq for this? Using PowerShell Extension v2020.3.0 - is there a reason for a specific version of 2020.1.0? |
I was able to apply WMF 5.1 on one box and it resolved the issue. On another box, I was able to stay at version 2020.1.0 and it resolved the issue. I also configured all extensions to NOT autoupdate.. note: I don't see a way to let others update automatically and keep this one at the old version. I wonder if there is one PowerShell Extension v2020.3.0 no longer supports old versions of PowerShell. |
This is not a requirement. You can also use Windows PowerShell 5.1. If you're still seeing an issue on startup, please open a new issue and also attach the logs so we can get a better idea of what's going on. @matthew8gibson I'm in the process of adding a docs change to make this easier to discover: MicrosoftDocs/PowerShell-Docs#5617 You'll want the |
Thanks, Tyler. If others can understand the underlying problem more quickly than I did that'd be great. |
upgrading to WMF 5.1 fixed this issue for me. |
Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead. |
Thanks @BrendonOSullivan, I'll get this added to the troubleshooting guide. |
I just downgraded to the previous PowerShell Extension and the issue appears to be resolved:
v2020.1.0 - Wednesday, January 15, 2020
Issue Description
PowerShell editor services are not starting on 3 different Windows 2012 R2 servers (they are in 3 different environments.). These have all been working successfully in the past.
Version: 1.43.0 (system setup)
Commit: 78a4c91400152c0f27ba4d363eb56d2835f9903a
Date: 2020-03-09T19:47:57.235Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 6.3.9600
note:
this is happening on 3 different Windows 2012 R2 servers in 3 different environments that I use.
Steps to Reproduce:
I think this is the core issue:
Here is error from log:
3/19/2020 2:10:27 PM [NORMAL] - Visual Studio Code v1.43.0 64-bit
3/19/2020 2:10:27 PM [NORMAL] - PowerShell Extension v2020.3.0
3/19/2020 2:10:27 PM [NORMAL] - Operating System: Windows 64-bit
3/19/2020 2:10:27 PM [NORMAL] - Language server starting --
3/19/2020 2:10:27 PM [NORMAL] - PowerShell executable: C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe
3/19/2020 2:10:27 PM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.3.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\logs\1584645027-a0abfe13-cba6-46a9-a1ef-f6bafc0e81221584645008564\EditorServices.log' -SessionDetailsPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\sessions\PSES-VSCode-3692-740215' -FeatureFlags @()
3/19/2020 2:10:27 PM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.3.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\logs\1584645027-a0abfe13-cba6-46a9-a1ef-f6bafc0e81221584645008564\EditorServices.log' -SessionDetailsPath 'c:\Users\Administrator.vscode\extensions\ms-vscode.powershell-2020.3.0\sessions\PSES-VSCode-3692-740215' -FeatureFlags @()
3/19/2020 2:10:27 PM [NORMAL] - powershell.exe started.
3/19/2020 2:10:27 PM [NORMAL] - Waiting for session file
3/19/2020 2:12:27 PM [NORMAL] - Error occurred retrieving session file
3/19/2020 2:12:27 PM [NORMAL] - Language server startup failed.
3/19/2020 2:12:27 PM [ERROR] - The language service could not be started:
3/19/2020 2:12:27 PM [ERROR] - Timed out waiting for session file to appear.
Does this issue occur when all extensions are disabled?: No
The text was updated successfully, but these errors were encountered: