3

Just started getting following error, when I open Powershell Script in Visual Studio Code. It was working fine till yesterday. Here is the error:

The language service could not be started: 
Error: The language client requires VS Code version ^1.26 but recevied version 1.25.1

I googled it found a page which said to change package.json file to older version, but I cant find that file, I am using a macos.

6
  • You’re not comfortable taking the July 2018 update (1.26)? Package.json is a visual studio extension manifest file, and you can find it at the root of an extension directory. Commented Sep 10, 2018 at 14:01
  • 1
    The error is saying you need to update VSCode.. it moves quickly and so needs updating often. Commented Sep 10, 2018 at 14:02
  • @JamesC. - When I do update, it says it is updated already? Commented Sep 10, 2018 at 14:03
  • Are you behind a proxy? If you can't auto-update, download the installer again or downgrade your powershell extension. Commented Sep 10, 2018 at 14:04
  • 1
    @TheIncorrigible1 - How can I downgrade the extension? Commented Sep 10, 2018 at 14:05

1 Answer 1

5

Your problem is incompatible versions. The PowerShell extension is using a later feature in vscode that is not available in the version you have installed.

You can:

  1. Upgrade vscode (if auto-update is failing, you can download the installer and re-run it)
  2. Downgrade the PowerShell extension
    • Use the latest VSIX that worked for you
    • Use Extensions: Install from VSIX... from the Command Palette (CTRL+SHIFT+P) in vscode
    • Turn off auto-update on your extensions by adding the following to settings.json:
      "extensions.autoUpdate": false,
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you this helped me out perfectly. I really wish they fixed this slow starting issues. If i am not on 1.25 then it takes several minutes just to open VSCode. This has been an issue ever since 1.26, we are close to 1.30 and it still isn't fixed! This is a "game braking" issue!
Had the same issue. Choco install was the problem and it was running all the time without the upgrade. Which we need to think about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.