# New UE5 c++ project cannot find header files and open source file in visual studio 2019

**URL:** <https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, UE5-0\
**Created:** [April 8, 2022, 9:17pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910 "2022-04-08T21:17:47Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReaperDuQC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ReaperDuQC](https://forums.unrealengine.com/u/ReaperDuQC)\
**Post date:** [April 8, 2022, 9:17pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/1 "2022-04-08T21:17:47Z")

</div>

I am curious how to fix this. As soon as I open a new c++ project and enter visual studio, and the solution finished compiling, I receive around 10 000 errors stating cannot open sources files, the likes of CoreMinimal.h.

Basically, it worked both fine with visual studio 2019 and Unreal Engine 4.27,  
also, it worked with Visual studio 2019 and Unreal Engine 5.0 Early access without any problem,

But with the official release of Unreal Engine 5, as soon as I create a new project or upgrade an existing project to UE5, Visual studio suddenly cannot find header files, Giving me between 7000 and 12000 errors. Not what I like to see on a new project.

Before anyone propose the solution of generating the source files, I already followed those steps without any changes.  
[Cannot open source file name.generated.hc](https://forums.unrealengine.com/t/cannot-open-source-file-name-generated-hc/413312).

I also try manually placing the directory location, in option / NMake / Include Search Path, it also did nothing.

Code error E1696

---

<div class="post-metadata">

**Author:** ![BrainVRTech1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BrainVRTech1](https://forums.unrealengine.com/u/BrainVRTech1)\
**Post date:** [May 12, 2022, 3:09pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/3 "2022-05-12T15:09:29Z")

</div>

Hi, I have the same issue and I could not solve it. Did you find how?

---

<div class="post-metadata">

**Author:** ![Nocktaal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nocktaal](https://forums.unrealengine.com/u/Nocktaal)\
**Post date:** [May 17, 2022, 11:16pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/4 "2022-05-17T23:16:44Z")

</div>

Yuup, exact same issue here. And I guess because of this, but my intelisense is reeeeeealy slow (takes minutes) and so is my build time from UE. Feels wrong (VS 2019)

---

<div class="post-metadata">

**Author:** ![ReaperDuQC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ReaperDuQC](https://forums.unrealengine.com/u/ReaperDuQC)\
**Post date:** [May 20, 2022, 12:34pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/5 "2022-05-20T12:34:12Z")

</div>

I did not find how to fix the error of not finding the header files, but I since learned that the workflow is really different from my experience with Unity, while Unity compile the solution each time I saved a script, by following a udemy tutoriel with unreal engine 5, it seems each time i am really ready to compile, i must close the Unreal project, and then compile in visual studio,

I have also been recommended to completely disregard Intelisense, So yeah…  
still works but seems weird but i got used to it.

---

<div class="post-metadata">

**Author:** ![Narg](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/narg/32/870597_2.png) [@Narg](https://forums.unrealengine.com/u/Narg)\
**Post date:** [May 24, 2022, 2:47am UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/6 "2022-05-24T02:47:07Z")

</div>

I’m having the exact same issue, I ported my project to UE5 and the header files don’t seem linked. The compiler doesn’t find them and right-clicking “Go-To Document” fails to find the header, despite the path being correct.

---

<div class="post-metadata">

**Author:** ![Iketh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/iketh/32/490536_2.png) [@Iketh](https://forums.unrealengine.com/u/Iketh)\
**Post date:** [May 28, 2022, 9:40pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/7 "2022-05-28T21:40:08Z")

</div>

I fixed this by upgrading the windows 10 sdk. In VS installer, select game development, and uncheck win10 sdk 19.something and select the latest win10 sdk which for me was 22.something. You can probably leave 19 installed if you need it, but I didn’t.

---

<div class="post-metadata">

**Author:** ![CoolOppo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CoolOppo](https://forums.unrealengine.com/u/CoolOppo)\
**Post date:** [May 29, 2022, 11:10am UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/8 "2022-05-29T11:10:38Z")

</div>

Didn’t work for me but thanks for sharing.

Can Epic maybe fix this so that coding in the only language they let us code in isn’t the worst possible experience? Remember when they used to tell people to straight-up disable IntelliSense? Are we going back to those days so I can have lighting that looks good at 2 fps from a still camera and still shows temporal artifacting? Sure seems like the priorities are in check

---

<div class="post-metadata">

**Author:** ![Iketh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/iketh/32/490536_2.png) [@Iketh](https://forums.unrealengine.com/u/Iketh)\
**Post date:** [May 29, 2022, 4:58pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/9 "2022-05-29T16:58:58Z")

</div>

I just looked closer and you’re right it didn’t fully work for me either. I have 1100+ warnings and 11 errors instead of 1200+ errors after the SDK change but intellisense is working now regardless. Building inside VS also works despite the 10 errors. All I was trying to fix was colorizing the code so I’m happy.

---

<div class="post-metadata">

**Author:** ![portculis1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@portculis1](https://forums.unrealengine.com/u/portculis1)\
**Post date:** [June 11, 2022, 9:21pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/10 "2022-06-11T21:21:19Z")

</div>

I played with the includePaths some more since it was giving multiple definitions when it shouldn’t.

I updated includePaths to look like:

```auto
{
...
"ue5IncludePathHack": [
            "${workspaceFolder}/**",
            "<path to ue5 repo>/UnrealEngine/Engine/Source/Runtime/Core/Public/**",
            "<path to ue5 repo>/UnrealEngine/Engine/Source/Runtime/CoreUObject/Public/**"
        ]

...
}

```

---

<div class="post-metadata">

**Author:** ![portculis1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@portculis1](https://forums.unrealengine.com/u/portculis1)\
**Post date:** [June 11, 2022, 11:04pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/11 "2022-06-11T23:04:15Z")

</div>

I have a imperfect workaround for VSCode until they fix this problem. It seems like VSCode needs some guidance on where to look. I updated my `c_cpp_properties.json` to look something like this:

```auto
{
    "env": {
        "ue5IncludePathHack": [
            "${workspaceFolder}/**",
            "<path to ue5 repo>/UnrealEngine/Engine/Source/**"
        ]
    },
    "configurations": [
        {
            "name": "scarEditor Editor Linux Development (scar)",
            "intelliSenseMode": "linux-gcc-x64",
            "cppStandard": "gnu++17",
            "compilerPath": "/usr/bin/gcc",
            "includePath": ["${ue5IncludePathHack}"],
            "browse": {
              "limitSymbolsToIncludedHeaders": true,
              "databaseFilename": ""
            }
        },
        {
            "name": "Linux",
            "intelliSenseMode": "linux-gcc-x64",
            "cStandard": "gnu17",
            "cppStandard": "gnu++17",
            "compilerPath": "/usr/bin/gcc",
            "includePath": ["${ue5IncludePathHack}"],
            "browse": {
              "limitSymbolsToIncludedHeaders": true,
              "databaseFilename": ""
            }
        }
    ],
    "version": 4
}

```

Its not perfect… this allows intellisense to work but might see some complaints in ue5 source files. However, it seems to be close enough to how it was for ue4.

Also, you’ll have to reset this file after clicking on “Refreshing Visual Studio Code” in UE5 Editor.

Hope this helps

---

<div class="post-metadata">

**Author:** ![appleshooter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@appleshooter](https://forums.unrealengine.com/u/appleshooter)\
**Post date:** [June 12, 2022, 8:43pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/12 "2022-06-12T20:43:18Z")

</div>

I disabled Live Coding. The errors are still there but I can build now.

---

<div class="post-metadata">

**Author:** ![DrewB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DrewB](https://forums.unrealengine.com/u/DrewB)\
**Post date:** [March 5, 2023, 1:10am UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/13 "2023-03-05T01:10:16Z")

</div>

For me, it fails to build anything related to windows.h files or win32 files. cannot bitmap or do sockets or anything related to headers and linking does not help. I don’t know if this is related to your issue but UE5 only seems to work with its own header files which is massively limiting a lot of projects who saw potential with coding in cpp.

---

<div class="post-metadata">

**Author:** ![CthulhuJon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cthulhujon/32/745277_2.png) [@CthulhuJon](https://forums.unrealengine.com/u/CthulhuJon)\
**Post date:** [October 14, 2023, 1:40am UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/14 "2023-10-14T01:40:15Z")

</div>

Same problem with both fresh install of UE5 and 5.3 with VScode. Is there a general fix / faq for this please? I’ve tried editing paths, to no avail, and usually just end up breaking the project so it won’t load.

---

<div class="post-metadata">

**Author:** ![myspark](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/myspark/32/703733_2.png) [@myspark](https://forums.unrealengine.com/u/myspark)\
**Post date:** [April 2, 2024, 6:08am UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/15 "2024-04-02T06:08:49Z")

</div>

Have you solved the problem? I also created a C++class in the blueprint project, which directly caused the inability to find header files such as coremini. h, and the project was scrapped

---

<div class="post-metadata">

**Author:** ![CAS.12](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CAS.12](https://forums.unrealengine.com/u/CAS.12)\
**Post date:** [May 6, 2024, 4:24pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/16 "2024-05-06T16:24:16Z")

</div>

This worked for me:

[c++ - Visual Studio Code/Intellisense cannot find Unreal Engine CoreMinimal.h file - Stack Overflow](https://stackoverflow.com/questions/75171664/visual-studio-code-intellisense-cannot-find-unreal-engine-coreminimal-h-file)

---

<div class="post-metadata">

**Author:** ![NJDrew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NJDrew](https://forums.unrealengine.com/u/NJDrew)\
**Post date:** [October 19, 2024, 7:15pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/17 "2024-10-19T19:15:51Z")

</div>

Had same in brand new Unreal Project. The Solution explorer complained it couldnt find the engine sources, Nor the games generated source files it generated.  
Building and clean and rebuild all sucessful but no Intellisense.

To fix for me, in the UE Editor, with Visual studio closed.

Select Tools-\> New C++ class,  
select public , All classes → Object.  
Called it temp as I am going to delete later.  
Create the class and select to open in Visual Studio.  
On opening it then popped up about linking in other projects, and solution to link the UE source projects and then find the generated Character and Game mode headers.  
Closed everything and repoened just to be sure and still picked up everything.

---

<div class="post-metadata">

**Author:** ![OmniFace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OmniFace](https://forums.unrealengine.com/u/OmniFace)\
**Post date:** [December 23, 2024, 9:55pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/18 "2024-12-23T21:55:59Z")

</div>

To fix for me, in the UE Editor, with Visual studio closed.

Select Tools-\> New C++ class,  
select public , All classes → Object.  
Called it temp as I am going to delete later.  
Create the class and select to open in Visual Studio.  
On opening it then popped up about linking in other projects, and solution to link the UE source projects and then find the generated Character and Game mode headers.  
Closed everything and repoened just to be sure and still picked up everything.  
[/quote]

This fixed mine too! I didn’t get a message about linking, but it asked to reload everything and that seems to have corrected this issue.

I was just trying to follow the basic networking tutorial but use 5.5… It’s been like 8 hours of work to get a new project to work in Visual Studio Community 2022. What a PITA.

---

<div class="post-metadata">

**Author:** ![Richards\_Game\_Studio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/richards_game_studio/32/485762_2.png) [@Richards\_Game\_Studio](https://forums.unrealengine.com/u/Richards_Game_Studio)\
**Post date:** [July 6, 2025, 8:16pm UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/19 "2025-07-06T20:16:44Z")

</div>

Sadly, this does not work for me, because I cannot open my project in the editor. It keeps saying that I have to rebuild it, but that obviously will not work because of this issue.  
I have tried all the usual “fixes”, however nothing works.

I am using UE 5.6 and visual studio 2022.

It does not matter what project I choose (new or existing), nothing works.  
Thanks for any help.

Edit:  
It seems that the include directory paths are not added to the project config!

---

<div class="post-metadata">

**Author:** ![3a3a4f511484413089cf81ff5c83df96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3a3a4f511484413089cf81ff5c83df96](https://forums.unrealengine.com/u/3a3a4f511484413089cf81ff5c83df96)\
**Post date:** [April 11, 2026, 5:21am UTC](https://forums.unrealengine.com/t/new-ue5-c-project-cannot-find-header-files-and-open-source-file-in-visual-studio-2019/520910/20 "2026-04-11T05:21:17Z")

</div>

# Complete Fix Guide: UE 5.7 + VS2022 C++ Compile Failures, Missing Module Errors & Broken Project Generation

This step-by-step guide resolves the most common UE 5.7 C++ project issues on Windows, including failed auto-compile after adding a new C++ class, “modules missing/built with a different engine version” errors, missing right-click project generation options, and `VisualStudioTools` build failures.

* * *

## My Environment

- Engine Version: Unreal Engine 5.7

- IDE: Visual Studio 2022

- Operating System: Windows 11

* * *

## Step-by-Step Fix Workflow

### Step 1: Fully Delete Stale Build Cache

First, **completely close the Unreal Engine Editor and Visual Studio** to avoid file lock issues.

Navigate to your project root directory, and permanently delete these 3 auto-generated cache folders (your source code and assets will NOT be lost):

- `Binaries`

- `Intermediate`

- `.vs` (this is a hidden folder; enable _Hidden items_ in the File Explorer View tab to see it)

### Step 2: Remove Invalid `VisualStudioTools` References

The root cause of most `VisualStudioTools` build errors is leftover invalid references in your project config files. Inspect and clean the following files:

1. Go to your project’s `Source` folder, open and check these 3 files:

2. Open your project root’s `[YourProjectName].uproject` file with a text editor.

3. Ensure **there are no references to `VisualStudioTools`** in any of these files. Delete any lines or plugin entries that include this module name, then save all changes.

### Step 3: Regenerate Visual Studio Project Files

Use one of the two methods below to generate a fresh Visual Studio solution (`.sln`) file:

#### Method 1: Right-Click Context Menu (Simplest)

- Right-click your `[YourProjectName].uproject` file

- Select **Generate Visual Studio project files** from the context menu

- If this option is missing, see the bonus fix at the end of this guide to restore it.

#### Method 2: PowerShell Command (100% Reliable, No Context Menu Required)

1. Open PowerShell in your project root directory (type `powershell` in the File Explorer address bar and press Enter)

2. Copy and paste the command below, **replace `studyProject.uproject` with your actual .uproject file name** , then run it:

3. Wait for the command to finish. A `Result: Succeeded` message confirms the solution file was generated successfully.

### Step 4: Manually Build Your Project in Visual Studio

1. Double-click the newly generated `[YourProjectName].sln` file to open it in Visual Studio 2022.

2. At the top of the Visual Studio window, set these two critical build configurations:

3. In the Solution Explorer panel (usually on the right), find your `[YourProjectName]` project node (under the top-level solution).

4. Right-click the project node, then select **Build**.

5. Wait for the build process to complete. A _Build succeeded_ message in the Output window means the process is complete.

* * *

## Final Verification

1. Close Visual Studio after a successful build.

2. Double-click your `.uproject` file to launch Unreal Engine.

3. The editor will launch without errors, and your newly added C++ class will appear in the Content Browser as expected.

* * *

## Bonus Fix: Restore Missing “Generate Visual Studio project files” Right-Click Option

This issue is caused by an incorrect file association for `.uproject` files:

1. Right-click your `.uproject` file → Select **Properties**

2. On the General tab, click **Change** next to “Opens with”

3. Click **More apps** → Scroll to the bottom and select **Look for another app on this PC**

4. Navigate to one of the paths below, select `UnrealVersionSelector.exe`, and click Open:

5. Check “Always use this app to open .uproject files”, then click OK.

6. For a full system repair, right-click `UnrealVersionSelector.exe` → Run as administrator, then confirm the engine association repair prompt.

* * *

## Key Notes to Avoid Common Pitfalls

1. Never skip deleting the cache folders: `Binaries`, `Intermediate`, and `.vs` are the source of 90% of “different engine version” errors, and deleting them will not affect your project’s source code or assets.

2. Use correct PowerShell syntax: The `&` operator at the start of the command is required to run executables with quoted paths in PowerShell, and `$PWD` is PowerShell’s native variable for the current working directory (the equivalent of CMD’s `%cd%`).

3. Double-check your build configuration: You must use `Development Editor` for builds that will work with the Unreal Engine editor.

4. Invalid `VisualStudioTools` references can live in more than just your `.Build.cs` file: Always check your `.Target.cs` files and `.uproject` plugin list as well.
