# Is it normal to have a large number of errors in Visual Studio 2022 when opening most Unreal Engine .cpp and .h files?

**URL:** <https://forums.unrealengine.com/t/is-it-normal-to-have-a-large-number-of-errors-in-visual-studio-2022-when-opening-most-unreal-engine-cpp-and-h-files/1598767>\
**Category:** International\
**Tags:** error, files, unreal-engine, Visual-Studio, question, CPP\
**Created:** [January 8, 2024, 9:24am UTC](https://forums.unrealengine.com/t/is-it-normal-to-have-a-large-number-of-errors-in-visual-studio-2022-when-opening-most-unreal-engine-cpp-and-h-files/1598767 "2024-01-08T09:24:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OperStyle18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OperStyle18](https://forums.unrealengine.com/u/OperStyle18)\
**Post date:** [January 8, 2024, 9:24am UTC](https://forums.unrealengine.com/t/is-it-normal-to-have-a-large-number-of-errors-in-visual-studio-2022-when-opening-most-unreal-engine-cpp-and-h-files/1598767/1 "2024-01-08T09:24:16Z")

</div>

To be more specific, I open the ORIGINAL files made by the developers of the engine, and they can be that 100 errors and more, I ask because the code does not work, which should work, so I think that perhaps you need to reinstall both UE and studio, and then install again. Studio by the way I have already tried to reinstall - did not help. Installed even specifically on tutorials on the Internet for proper integration with the engine, still errors do not disappear. I remind you that the files are original, I did not change or touch anything in them, the project in ue clean form, just created.

On the screenshot of the file UObjectBase.cpp selected randomly - 194 errors, as you can see, to me this is definitely some kind of bug and it should not be like this, what is the problem?

 ![2024-01-08_11-56-13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/c/33c79b0ed63edda648cb98459f5fa39ed58fd2ee.png)

---

<div class="post-metadata">

**Author:** ![Sitiana](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sitiana/32/1194605_2.png) [@Sitiana](https://forums.unrealengine.com/u/Sitiana)\
**Post date:** [January 8, 2024, 9:40am UTC](https://forums.unrealengine.com/t/is-it-normal-to-have-a-large-number-of-errors-in-visual-studio-2022-when-opening-most-unreal-engine-cpp-and-h-files/1598767/2 "2024-01-08T09:40:19Z")

</div>

Hi, general problem is that Visual Studio sometimes doesn’t recognize some Unreal Engine macros and treat them as errors, but these are not real errors.

There is an addon/extension to Visual Studio to make it works with Unreal Engine code slightly better, but I use Rider - which is paid, but works flawlessly to write and browse UE code.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [January 8, 2024, 2:22pm UTC](https://forums.unrealengine.com/t/is-it-normal-to-have-a-large-number-of-errors-in-visual-studio-2022-when-opening-most-unreal-engine-cpp-and-h-files/1598767/3 "2024-01-08T14:22:48Z")

</div>

Did you open the project through the solution file (sln) or just open up a bare cpp / header file without the surrounding project?

VS needs reference to unreal engines files to be able to not throw errors. It looks like direct file opening to me.

---

<div class="post-metadata">

**Author:** ![OperStyle18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OperStyle18](https://forums.unrealengine.com/u/OperStyle18)\
**Post date:** [January 9, 2024, 7:58am UTC](https://forums.unrealengine.com/t/is-it-normal-to-have-a-large-number-of-errors-in-visual-studio-2022-when-opening-most-unreal-engine-cpp-and-h-files/1598767/4 "2024-01-09T07:58:22Z")

</div>

Hi! I didn’t know what sln files are and how to open them, but after reading your answer I tried to open c++ files not through the solution browser, but through ue editor from the Engine C++ Classes folder and when I opened them this way - no errors. In general, these errors only confused me and led me off the right path, as I realized that it is my code that is not working and not the problem in these obscure errors, thank you!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 8, 2024, 7:58am UTC](https://forums.unrealengine.com/t/is-it-normal-to-have-a-large-number-of-errors-in-visual-studio-2022-when-opening-most-unreal-engine-cpp-and-h-files/1598767/5 "2024-02-08T07:58:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
