-
Notifications
You must be signed in to change notification settings - Fork 499
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
Session startup should indicate if the current PowerShell version is unsupported #401
Comments
Hi Bill, unfortunately we don't support PowerShell v2 at this time and we currently have no plans to do so. Regardless of that, you did indeed find a bug with our startup script. When I fix that issue, I'll make sure to include a check for the PowerShell version so that we can let the user know our lack of support for anything below PSv3. |
Unfortunately I can't upgrade PowerShell on this particular machine at this time. It would be nice not to see this error. Understood that there's some stuff that might not work on PS v2. |
FYI, I also see this error message after closing the previous error:
|
I've got a fix prepared to smooth out the rough edges when the extension is loaded on a machine with PowerShell v2. Also fixed the issue where the session menu throws an error if you click the status bar item when there was a startup failure. |
Fix #401: Session startup should indicate if PS version is unsupported
Still seeing the following error (vscode 1.8.1, Windows Server 2008 R2, module version 0.9.0):
|
Looks like it's running extension 0.8.0? From the log you pasted:
In 0.9.0, the PowerShell version gets checked before the Remove-Module call occurs so this shouldn't be happening if the correct extension version is running. Let me know what you find! |
Sorry, I pasted the wrong text. This is the actual error:
|
Ouch! Clearly I didn't test that on a PowerShell v2 machine :) Thanks for pointing that out, I'll fix it in 0.9.1. |
Thanks! |
$PSVersionTable
:Issue description:
Error when starting PowerShell module. ERROR: Remove-Module : No modules were removed. Verify that the specification of modules to remove is correct and those modules exist in the runspace.
Attached Logs
powershell.exe started --
pid: 13860
exe: C:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe
bundledModulesPath: C:\Users\user.vscode\extensions\ms-vscode.PowerShell-0.8.0\modules
args: C:\Users\user.vscode\extensions\ms-vscode.PowerShell-0.8.0\scripts\Start-EditorServices.ps1 -EditorServicesVersion '0.8.0' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '0.8.0' -BundledModulesPath 'C:\Users\user.vscode\extensions\ms-vscode.PowerShell-0.8.0\modules' -LogLevel 'Normal' -LogPath 'C:\Users\user.vscode\extensions\ms-vscode.PowerShell-0.8.0\logs\1482165307-496ebe8d-afa6-4b54-acf1-7aa0e16fed961482165300434\EditorServices.log'
PowerShell could not be started, click 'Show Logs' for more details.
ERROR: Remove-Module : No modules were removed. Verify that the specification of modul
ERROR: es to remove is correct and those modules exist in the runspace.
At C:\Users\user.vscode\extensions\ms-vscode.PowerShell-0.8.0\scripts\Start-EditorServices.ps1:63 char:18
+ Remove-Module <<<< PSReadline
+ CategoryInfo : ResourceUnavailable: (:) [Remove-Module], InvalidOperationException
+ FullyQualifiedErrorId : Modules_NoModulesRemoved,
Microsoft.PowerShell.Commands.RemoveModuleCommand
The text was updated successfully, but these errors were encountered: