Recently I ran into the following problem when editing Powershell scripts using Visual Studio Code ;
First I tried to remove the specific extension. Go to the extenstion tab and check for installed extensions using @installed :
Click the action/config wheel to uninstall the specific extension and reload and reinstall it. In my case that wasn’t the solution. I found out that the specific extension wasn’t completely removed. My solution was after removing the extension in Visual Studio Code, checking for any leftovers in %userprofile%\.vscode\extensions :
After deleting the specific folder and reinstalling the extension the error was gone!