enter image description here Hi may I know how to change my Solidity linter compiler version in Visual Studio Code(vscode)? OR Visual studio code how to specify solidity compiler version?

The only Solidity related extensions I have installed are solidity 0.0.38 by Juan Blanco, and Solidity Extended 3.0.2 by beaugunderson.

I have applied the User Settings in VS Code as the following but still get error:

{"files.autoSave": "afterDelay",
  "files.autoSaveDelay": 1000,
  "editor.minimap.enabled": false,
  "editor.tabSize": 2,
  "editor.detectIndentation": false,
  "editor.wordWrap": "on",
  "files.associations": {
    "*.sol": "solidity"
  "workbench.iconTheme": "material-icon-theme",
  "material-icon-theme.showUpdateMessage": false,

  "solidity.compileUsingRemoteVersion" : "latest",
  "solidity.packageDefaultDependenciesContractsDirectory": "contracts",
  "solidity.packageDefaultDependenciesDirectory": "node_modules",
  "solidity.soliumRules": {
    "imports-on-top": 0,
    "variable-declarations": 0,
    "no-inline-assembly": 5,
    "indentation": ["error",2],
    "quotes": ["error","double"]
  "solidity.validationDelay": 1000,

  if in Windows system:

Now I've also install Solidity globally in my Linux: $ sudo npm install -g solc Then I've got this from the terminal: /home/userXYZ/.npm-global/bin/solcjs -> /home/userXYZ/.npm-global/lib/node_modules/solc/solcjs + solc@0.4.22

Then changed User Setting: "solidity.compileUsingRemoteVersion" : "latest"

Then re-started VS Code, still I am getting this error... Please help. Thank you

  • 1
    This is not off-topic!!! It is about upgrading a plugin to use the most recent version of the solidity compiler. It surely will help others solidity developers trying to do the same thing! – Ismael Apr 20 '18 at 18:54

[Solved] Thank you Juan Blanco for his advice. So the main issue is that the forked extension(Solidity Extended by beaugunderson) was highjacking this one(solidity by Juan Blanco) hence I had the old version of the compiler 0.4.17 but not the latest version 0.4.23.

  • How did you change the version? I removed other extensions and it does not work – Ender Dec 4 '19 at 10:02
  • 1
    by installing solc in your system – Russo Dec 22 '19 at 3:34

Go to node_modules -> solc -> package.json -> version of your compiler can be found at the bottom.

Never edit the package.json file

To fix the problem

-Copy the version number at the bottom ex:-"version": "0.5.1"

-go to your contract and paste on pragma. ex:- pragma solidity ^0.5.1;

This should fix your issue.

  • I don't have Go to node_modules on the VSC – Ender Dec 4 '19 at 10:03

If you still have a problem with the version in VS Code, this worked for me:

Install specific solc version locally or globally: npm i -g solc or npm i solc.

Add this setting in local VSCode settings: .vscode/settings.json

    "solidity.compileUsingRemoteVersion": "v0.7.4+commit.3f05b770",
    "solidity.enableLocalNodeCompiler": false

In my case I am using solidity v0.7.4. Note also the other config: "solidity.enableLocalNodeCompiler": false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.