Extra IntelliSense errors caused by include paths and precompiled headers #6866
Labels
Area-Build
Issues pertaining to the build system, CI, infrastructure, meta
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Terminal
The new Windows Terminal.
Resolution-Fix-Committed
Fix is checked in, but it might be 3-4 weeks until a release.
Environment
Steps to reproduce
OpenConsole.sln
in Visual Studio, switch the platform from "Any CPU" to "x64," and build the TerminalAppLib project.TerminalPage.cpp
(undercontrols/TerminalPage.xaml
in the solution explorer).Expected behavior
IntelliSense should not show any errors/red squiggles, given that the build succeeded.
Actual behavior
IntelliSense finds the wrong
pch.h
file and goes on to produce a few hundred errors about missing definitions.Specifically, it finds
src\cascadia\TerminalApp\pch.h
instead ofsrc\cascadia\TerminalApp\lib\pch.h
. You can confirm this by using Go To Definition/F12 on the#include "pch.h"
at the top ofTerminalPage.cpp
. Changing this to#include "lib/pch.h"
, or making an equivalent change to the project include paths, lets IntelliSense find the right header and all the errors disappear.The build succeeds because the compiler does not use the usual include path search for this header when PCH is enabled, while IntelliSense fails because its PCH implementation does not work this way.
The text was updated successfully, but these errors were encountered: