When I try any example with Platformio I’m getting the following error (this error didn’t happen before with the same source code).
C:\Users\ASUS\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32:31: fatal error: freertos/FreeRTOS.h: No such file or directory
Removing .platformio\packages\framework-arduinoespressif32\ worked. This directory got messed up after using platform_packages in platformio.ini to install a custom version. Reverting platformio.ini did not resolve the issue. Deleting the directory (cache) did.