VSCode mistakenly reports that a header file is missing even though I can open this file using Go to definition and all symbols from this file are perfectly visible in the main file. This only occurs when there are several project folders in the workspace:

Originally reported in a PlatformIO Community topic, so I put together a more straightforward example. Steps to reproduce the issue:
vscode-prj1vscode-prj2 to the workspacevscode-prj3 to the workspacetest3.h.#include test3.h line. OS and Version: Windows 8.1
VS Code Version: 1.14.1
C/C++ Extension Version: 0.26.3
cc @ivankravets
This is fixed in our pending 1.0 release with our new multi-root implementation, but only when the includePath is changed to be like "${workspaceFolder}/inc" instead of just "inc". I'll look into why the implicit "${workspaceFolder} appears to work in single root.
@valeros "inc" without "${workspaceFolder}" is probably not going to be supported for multi-root in our next release (we could change this to a feature request to add support for that) -- it happens to work "unintentionally" in the single root case (as a byproduct of path canonicalization), but that mechanism gives the wrong workspace folder in the multiroot case. Can you add the ${workspaceFolder} later? It won't fix it now, because it's hitting a different issue.
I filed issue https://github.com/microsoft/vscode-cpptools/issues/4983 to track the relative path issue.
"inc" without "${workspaceFolder}" is probably not going to be supported for multi-root in our next release (we could change this to a feature request to add support for that)
I used relative paths just for that synthetic example, so relative paths actually not a problem because we use absolute paths when rendering our template for c_cpp_properties.json file. So in our case it's all right as long as it works properly with absolute paths.
Thanks!
@bobbrow @sean-mcmanus Is it possible to publish 0.26.x bugfix release and close this issue? We have a ton of reports and developers write bad feedback about our extension due to this issue:
We ask them to use 1 project per 1 workspace. However, this is not the right solution and most people think that the problem is with PlatformIO.
@ivankravets Yeah, sorry about that. We're looking into releasing 0.27.0-insiders as soon as possible: https://github.com/microsoft/vscode-cpptools/blob/master/Extension/CHANGELOG.md#cc-for-visual-studio-code-change-log . There were a huge amount of changes so we want to make sure there are no major regressions before shipping the release 0.27.0 (and we also have a couple Mac-only bugs we want to fix).
Thanks! We will wait for 0.27..0.
Our latest Insiders release has a new multi-root implementation (which fixes this bug): https://github.com/microsoft/vscode-cpptools/releases/tag/0.27.0-insiders. Please let us know if you find any multi-root-related bugs or regressions so we can prioritize fixing those for 0.27.0.
I cannot reproduce this issue with 0.27.0, so many thanks @sean-mcmanus
Most helpful comment
@ivankravets Yeah, sorry about that. We're looking into releasing 0.27.0-insiders as soon as possible: https://github.com/microsoft/vscode-cpptools/blob/master/Extension/CHANGELOG.md#cc-for-visual-studio-code-change-log . There were a huge amount of changes so we want to make sure there are no major regressions before shipping the release 0.27.0 (and we also have a couple Mac-only bugs we want to fix).