+200 incomplete type "TOptional<bool>" is not allowed

How do I “ACTUALLY” fix this issue of this error? This has prevented me from building the project. I’ve spent 5 months tyring to find the solution and nothing works but broke my project multiple times.

Refreshing visual studio code or regenerating it causes this error.

Even creating a new project with new empty C++ class gives this error:


How do I actually fix this? Please help.

Visual Studio cannot find the engine headers.

Ensure that the Visual Studio plugin is installed correctly (in the project, not in the engine!) and that all other Visual Studio integration settings are correct. See also the tab with the cheks.

Not a real solution, but my experience: Visual Studio doesn’t run properly with Unreal, there’s always something wrong. I switched to Jetbrains Rider, which interacts better with Unreal and runs much more problem-free.

1 Like