-
Notifications
You must be signed in to change notification settings - Fork 513
.NET Global Tool Startup Issue #2544
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
I'm not sure why but the extension is trying to load powershell core (pwsh.exe) rather than powershell.exe. my config file looks like this: {
"window.zoomLevel": 1,
"diffEditor.ignoreTrimWhitespace": false,
"git.autofetch": true,
"git.enableSmartCommit": true,
"editor.fontFamily": "'Cascadia Code',Consolas, 'Courier New', monospace",
"editor.fontLigatures": true
} Removing the font settings does not help. |
@dorgrin6 , I just deleted my pwsh.exe and it booted up fine. Obviously, that's not a good long term solution if you still want to have powershell core, but it will get you moving. |
@dorgrin6 were there any other logs, like
By default, if you have |
Oh you might need to set the log level to Diagnostic in the settings |
@dorgrin6 what version of the .NET global tool are you using? to find this run: |
I'm seeing this on Ubuntu 18.04 as well. |
This is #2158. Older versions of the PowerShell dotnet global tool have a bug in them where arguments are not processed properly, breaking our startup invocation. Please update your PowerShell version to 7 to enable this, or install a non-global tool PowerShell installation and configure the PowerShell extension to use it like: "powershell.powerShellDefaultVersion": "PowerShell (x64)" |
I did update to PowerShell 7, and the issue still existed. Here is the workaround that worked for me:
|
@dgancho can you share any information about the crash you were seeing? |
I did not look into logs, and nothing crashed, it was just hanging at |
I think the .NET global tool is significantly slower than the MSI so it might be that you didn't wait long enough, possibly. |
Thanks for the info! Can you also attach the logs here so we can get a better idea of what's going on? |
Thanks @rjmholt . Updating to PowerShell 7 did the trick for me: dotnet tool update powershell -g |
Can you elaborate on that? |
Significantly was an exaggeration. 😅 The MSI bits are optimized for Windows because it can only ever be installed on Windows. The .NET global tool contains stuff that truly runs on every platform and so it doesn't have such optimizations. You can see the difference at startup but not usually anywhere else. |
@dgancho I think you're seeing a different problem. We're currently tracking the non-specific startup issues in #2526, and keeping this one focused on .NET global tool issues.
It's slower to start up because it can't be cross-genned. This means it must be interpreted a slower way from .NET IL when it starts. This might impact the extension's startup time and if it exceeds the startup timeout, the extension will fail. However, once it's running and "warm", the JIT will have done at runtime what crossgen does ahead of time, and you'll see the same performance. Anyway this is all because the .NET global tool has to be platform independent. Platform-specific installations don't have this requirement. |
@TylerLeonhardt I attach 2 sets of Diagnostic logs (same machine)
|
I recently upgraded from 1.39.2 to 1.44.2 and had this exact issue. I uninstalled 1.44.2 and reinstalled 1.39.2 and all is well again. Seems to be version specific. I only use VS Code for Powershell, so will stick with what works until this is resolved. |
I should note that VSCode's version should have no effect on this issue; the extension has its own releases independent of VSCode. Any behavioural difference you're seeing is very likely due to some other factor that has changed |
I am having the same issue. I do not have PS Core or 7 installed, but can't get the PS extension to start. VS code versions are as follows: Version: 1.46.0 (system setup) 11/06/2020 11:53:47 [NORMAL] - powershell.exe started. Happy to supply more logs in requested. |
Issue DescriptionI am having the same issue while using PowerShell Extension v2020.6.0 Attached Logs
PowerShell Integrated Console hung up like this : Environment InformationVisual Studio Code
PowerShell Information
|
@geekwhocodes does this issue reproduce with PowerShell 7? |
It works with PowerShell 7 (I have |
I experience the issue where the extension fails to start while I am using powershell core 7.0.3. I see in the logs of the startup failure that the following command is being executed:
If I attempt to execute this command in a command shell, I get this:
I don't know much about powershell but I think the parser looks for commands inside double quotes but not in single quotes, so I think the StartupBanner string should be in single quotes. I could not find the source file that issues the command, so I couldn't fix it. However, I found: "C:\Users\chris.vscode\extensions\ms-vscode.powershell-2020.6.0\package.json" And in it:
I changed this to "true" to hopefully make the app not send the -StartupBanner command at all. It appears to work! |
Please ignore the last link, copy paste error. |
Uh oh!
There was an error while loading. Please reload this page.
Issue Type: Bug
Just opening vscode.
Extension crashes.
Added the log after looking at the powershell extension logs tab.
Trying to debug any powershell file will trigger the same messages.
Extension version: 2020.3.0
VS Code version: Code 1.43.0 (78a4c91400152c0f27ba4d363eb56d2835f9903a, 2020-03-09T19:47:57.235Z)
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
Adding logs:
The text was updated successfully, but these errors were encountered: