Solidity Compiler – Resolve Compiler Version Error in Visual Studio Code

compilersolidityversion-pragma

I started getting this error…

Source file requires different compiler version (current compiler is 0.7.3+commit.9bfce1f6.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version

…a few days ago on the following line of code only:

pragma solidity ^0.8.17;  

Anyway, this seems to be compiling without issues.

Anybody knows what may be causing this and how I can get rid of it?

Best Answer

To get rid of these annoying warnings, the best way is to disable the solidity extension by Juan Blanco and enable the Solidity extension by Nomic Foundation.