Adding Libraries in VSCode for Windows 10 is not working, but Works OK in Ubuntu 20.04 LTS

I have a clean installation on Visual Studio Code with PlatformIO running on a New Windows 10 Laptop. The problem I am having is to do with adding a library from the registry to a project. The Library is added successfully and the files for the library appears in the projects .pio/libdeps folder, however it does not add that folder into the c_cpp_configuration.json’s includepath section and as such the intellesence shows a squiggly line under the #include line for that library.

In the screenshot attached, the #include <FastLED.h> line has a squiggly line under it because the .pio/libdeps/esp01_1m/FastLED/src path is not in the includepath.

I need to add here that this problem is only occurring on my Windows 10 installation. On my Ubuntu 20.04 LTS installation, I do not have this problem. When I add a library to a project in Ubuntu, the library is installed into the libdeps folder and an includepath is added into the c_cpp_configuration.json file.

Has anyone else experienced this problem or have any suggestions on why this is happening? I have already tried uninstalling and reinstalling VSCode and platformio.

Ctrl+Shift+P → Rebuild IntelliSense.

Hello !

Closing and reopening vscode after one successfull build make them dispear.
There are only misleading indication from the IDE in this case.

Same than build not found error.
When I hit a second time the widget build everything goes fine.

Thank you. This fixes the problem, but I need to do that each time a add a library. Is there a setting I have missed that should make VSCode and/or PlatformIO do this rebuild automatically? I do not have to do this on my Linux Installation.