Path to shell executable "c:\<myproject>\platformio.exe" does not exist

I recently purchased a new machine so I could work from the C-drive with default settings.
Out of the blue the VS-code with platformIO fails:
I get:
The terminal process failed to launch: Path to shell executable “c:<myproject>\platformio.exe” does not exist.
A search on the C-drive verified that this is true. The file platformIO.exe does not show up in the path-finder.
New installation of VS-code, Python and addition of extension platformIO. No luck.
I think this must be a beginners error, but I have been stuck here for days. Any good ideas?

If you have no special only locally modified platforms / packages installed in PlatformIO, please do a clean reinstall.

Delete your entire C:\Users\<user>\.platformio (or wherever your previous installation of PlatformIO folder and restart VSCode. It will detect that the core is missing and reinstall it.

Also make sure that your user’s PATH environment variable doesn’t maybe still contain a path to the old installation, if you ever added that manually.

And lastly, if the project still doesn’t build, delete its hidden .vscode folder and do a Ctrl+Shift+P → Rebuild IntelliSense in VSCode to reinitialize those files.

YES !!! That did it ! Thanks again… :hugs:
Delete the platformIO folder helped.
I am sorry to admit that I have forgotten this “C:\Users<user>.platformio” - I think you had told me this at a earlier stage in another problem, but I could not find my way back to it.

Hello, the only solution that worked for me was adding the custom path where the platformio.exe is, in the settings.json of the vscode (to access it just search for “settings” in the vscode command palette and it is the first one).

Lines added in the settings.json :

"platformio-ide.useDevelopmentPIOCore": true,
"platformio-ide.customPATH": "C:/Users/pedro/.platformio/penv/Scripts",

After adding i just rebooted VSCode and it worked! :slight_smile:

Delete platformIO directory is helped to me too, thank you :slightly_smiling_face: