-
Notifications
You must be signed in to change notification settings - Fork 511
PowerShell won't start in VSCode #2849
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
Are you running as admin by chance? |
@TylerLeonhardt , it fails both when I run it as Administrator and as normal user. |
I've been having this exact same issue on one of my work test servers for a while now and I could never get to the bottom of the issue. The server in question is a 2012 R2 machine, so quite old. Everything works fine with Powershell 7.0/7.1, as soon as switch to Powershell 5.1 the system is unable to load the module. I've tried the latest Preview Powershell extension same issue (2020.7.0). The only way I managed to fix this after trying uninstalling, deleting VS cache, trying different versions of VS, trying different user profiles was to downgrade the Powershell extension to 2020.1.0 and now both 5.1 and 7.1 are working for me. Running as Admin or non admin, same issue. |
Is there an error message when it fails? What's the .NET version on the machine? |
Thank you. Details to follow shortly once I'm properly back online. |
It seems both issues differ a little though since I'm having the issue with the latest PowerShell version too. Do you guys need any additional information to further investigate this? (Or do you want to setup a call?) |
Thanks. At the minute I'm struggling a bit to get access to the server in question. Once I get back online I will try and include some additional information that will help you out. Updates to follow.... Thanks again 👍 |
I had the same issue where PowerShell 7 works but Windows PowerShell 5.1 did not. I noticed the problem when I realized PSScriptAnalyzer wasn't worked as expected in PS7. Tried to change to WinPS and the prompt never came up. What fixed the problem for me was opening the folder where my PSScriptAnalyzerSettings.psd1 file was located. Don't think it was completely necessary to open this specific folder, but it cleared the error about having a null or empty workspaceRootPath. Now both PS7 and WinPS work no problem. Even after closing the folder, I am unable to duplicate the problem. |
When I start PowerShell in cmd then I'm also at version 5.1:
|
Thanks everyone this looks like a duplicate of #2719 |
This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes. |
Issue Type: Bug
For some reason I can't use PowerShell inside vscode anymore. It just says "Loading the PowerShell extension is taking longer than expected". I've tried to reinstall the PowerShell extension and also VSCode. But none of these steps fixed it.
The issue happens whenever I open VSCode and try to do anything with a PowerShell file. (E.g. run it)
Anyway, when I first start VSCode this error shows up:
Here's the files mentioned in
C:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1593015143-28af1fd9-3db7-4b8f-b7e9-83453c652a221593015141446\
EditorServices.log:
StartEditorServices.log: (It's empty)
vscode-powershell.log:
I looked at similar issues too, but found no resolution:
#1673
VS Code version: Code 1.47.2 (17299e413d5590b14ab0340ea477cdd86ff13daf, 2020-07-15T18:22:06.216Z)
OS version: Windows_NT x64 10.0.18363
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Extensions (12)
The text was updated successfully, but these errors were encountered: