- 
                Notifications
    
You must be signed in to change notification settings  - Fork 520
 
Closed
Labels
Area-StartupBug: PowerShell 5.1Bugs when using PowerShell 5.1.Bugs when using PowerShell 5.1.Issue-BugA bug to squash.A bug to squash.Resolution-FixedWill close automatically.Will close automatically.
Milestone
Description
Hello,
The powershell terminal in v5.1 doesn't start anymore: it stays stuck in "starting powershell". This does not happen with the PS terminal in 7.1.3.
In the editorServices.log, I have this message:
2021-04-15 12:25:32.467 +02:00 [ERR] Execution of the following command(s) completed with errors:
    Import-Module C:\Users\UUUUUUUU\.vscode\extensions\ms-vscode.powershell-2021.2.2\modules\PowerShellEditorServices\Commands\PowerShellEditorServices.Commands.psd1
2021-04-15 12:25:32.586 +02:00 [FTL] unhandled exception
System.[vscode-powershell.log](https://github.com/PowerShell/PSScriptAnalyzer/files/6317403/vscode-powershell.log)
[EditorServices.log](https://github.com/PowerShell/PSScriptAnalyzer/files/6317404/EditorServices.log)
[powershell editor services.txt](https://github.com/PowerShell/PSScriptAnalyzer/files/6317405/powershell.editor.services.txt)
[StartEditorServices.log](https://github.com/PowerShell/PSScriptAnalyzer/files/6317406/StartEditorServices.log)
: Méthode introuvable : 'System.Threading.Tasks.ValueTask System.IO.Pipelines.PipeReader.CompleteAsync(System.Exception)'.
   à OmniSharp.Extensions.JsonRpc.InputHandler.<ProcessInputStream>d__36.MoveNext()
   à System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   à OmniSharp.Extensions.JsonRpc.InputHandler.ProcessInputStream(CancellationToken cancellationToken)
   à OmniSharp.Extensions.JsonRpc.InputHandler.<Start>b__27_0()
   à System.Reactive.Linq.QueryLanguage.StartAsyncImpl(Func`1 actionAsync, IScheduler scheduler)
Tried to downgrade to old vscode and addon version: same error.
Logs vscode in diagnostic mode attached.
Thx for support.
powershell editor services.txt
StartEditorServices.log
vscode-powershell.log
EditorServices.log
Steps to reproduce
open VScode
open a PS script in VScode
message "starting powershell" appears at the bottom right of your code after a few seconds
Message =====> PowerShell Integrated Console v2021.2.2 <===== in the Terminal
Expected behavior
message "powershell" appears at the bottom right of your code after a few seconds
message =====> PowerShell Integrated Console v2021.2.2 <=====
PS C:\xxxxxxxxxx>
in the Terminal
Actual behavior
Message "starting powershell" appears at the bottom right of your code after a few seconds
no prompt in terminal, so no way to execute commands
Run a script displays this message: 
_Cannot debug or run a PowerShell script until the PowerShell session has started. Wait for the PowerShell session to finish starting and try again. 
source powershell (extension)
Environment data
VScode version:
Version : 1.55.2 (user setup)
Commit : 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date : 2021-04-13T09:35:57.887Z
Electron : 11.3.0
Chrome : 87.0.4280.141
Node.js : 12.18.3
V8 : 8.7.220.31-electron.0
OS : Windows_NT x64 10.0.17763
Addon Powershell version: 2021.2.2
> $PSVersionTable (from windows powershell ISE)
Name                           Value                                                                                                                                                                                            
----                           -----                                                                                                                                                                                            
PSVersion                      5.1.17763.1490                                                                                                                                                                                   
PSEdition                      Desktop                                                                                                                                                                                          
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                          
BuildVersion                   10.0.17763.1490                                                                                                                                                                                  
CLRVersion                     4.0.30319.42000                                                                                                                                                                                  
WSManStackVersion              3.0                                                                                                                                                                                              
PSRemotingProtocolVersion      2.3                                                                                                                                                                                              
SerializationVersion           1.1.0.1     
> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() } (from vscode with PS terminal 7.1.3
1.19.1Metadata
Metadata
Assignees
Labels
Area-StartupBug: PowerShell 5.1Bugs when using PowerShell 5.1.Bugs when using PowerShell 5.1.Issue-BugA bug to squash.A bug to squash.Resolution-FixedWill close automatically.Will close automatically.