# UE4.20 and Visual Studio 2017 Errors

**URL:** <https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940>\
**Category:** Pipeline & Plugins\
**Tags:** unreal-engine, Visual-Studio, UE4, question, CPP\
**Created:** [July 21, 2018, 9:12pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940 "2018-07-21T21:12:49Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![umeerr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@umeerr](https://forums.unrealengine.com/u/umeerr)\
**Post date:** [July 21, 2018, 9:12pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/1 "2018-07-21T21:12:49Z")

</div>

Hello,

I have recently downloaded UE4.20 and also Visual Studio 2017. To be able to use Visual Studio 2017 I chose it as the source code editor. The code compiled without any problems, however inside the IDE, I am getting errors saying that some of the header files are inaccessable, even though they worked fine in 4.19 and Visual Studio 2015.

 ![248083-dsgaeg.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/4/ae478e6c9683114740b60acefc6729cd7c3d9516.png)

This doesn’t cause any issues with the compiler. Has anyone else had a problem like that? And how was it solved?

---

<div class="post-metadata">

**Author:** ![Kmack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kmack/32/706181_2.png) [@Kmack](https://forums.unrealengine.com/u/Kmack)\
**Post date:** [July 21, 2018, 10:56pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/2 "2018-07-21T22:56:26Z")

</div>

It’s not telling you that the header is inaccessible, but that the individual member in question is. Many previously-public members in 4.19 have been made private in 4.20 and exposed through accessors. I’m not in a position to check this particular case here, but when updating to 4.20, I did have to make changes like the following to my own classes:

```
StaticMeshComp->bGenerateOverlapEvents = false;

```

to

```
StaticMeshComp->SetGenerateOverlapEvents(false);

```

It’s likely that you’re in a similar situation and need to replace direct references to these member variables with calls to accessor functions.

---

<div class="post-metadata">

**Author:** ![umeerr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@umeerr](https://forums.unrealengine.com/u/umeerr)\
**Post date:** [July 21, 2018, 11:26pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/3 "2018-07-21T23:26:01Z")

</div>

Thank you very much for your reply, but something else is causing these errors as well, since it also doesn’t like Super::BeginPlay();, Super::Tick(DeltaTime);, SetupPlayerInputComponent and Generated\_Body()

 ![248101-afwa.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/a/71aecf2a4e0d377aecdfe45385149534a64869ca.png)

 ![248102-aseg.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/4/0f496decb614450d063e87c0e45f7fed6df281ff.png)

---

<div class="post-metadata">

**Author:** ![Para96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Para96](https://forums.unrealengine.com/u/Para96)\
**Post date:** [July 22, 2018, 1:11am UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/4 "2018-07-22T01:11:16Z")

</div>

I’m also experiencing this problem

I tried creating a new project (just in case something changed in this regard)  
but in the new project i’m also getting an error on all of the includes of \*.generated.h files aswell as  
the GENERATE\_BODY macro

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b496f3c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b496f3c1](https://forums.unrealengine.com/u/anonymous_user_b496f3c1)\
**Post date:** [July 22, 2018, 2:02am UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/5 "2018-07-22T02:02:43Z")

</div>

I am also experiencing the same issue.

---

<div class="post-metadata">

**Author:** ![Sveitar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sveitar/32/710746_2.png) [@Sveitar](https://forums.unrealengine.com/u/Sveitar)\
**Post date:** [July 22, 2018, 3:31am UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/6 "2018-07-22T03:31:29Z")

</div>

Look at my answer here: [VS cannot find generated.h files - C++ - Unreal Engine Forums](https://answers.unrealengine.com/questions/810626/vs-cannot-find-generatedh-files.html)

---

<div class="post-metadata">

**Author:** ![Para96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Para96](https://forums.unrealengine.com/u/Para96)\
**Post date:** [July 22, 2018, 8:55am UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/7 "2018-07-22T08:55:16Z")

</div>

I followed your instructions but it’s still giving me errors on the include of generated files and the generated body

---

<div class="post-metadata">

**Author:** ![Sveitar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sveitar/32/710746_2.png) [@Sveitar](https://forums.unrealengine.com/u/Sveitar)\
**Post date:** [July 23, 2018, 6:54pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/8 "2018-07-23T18:54:01Z")

</div>

I fixed the path, try again now. Also vote here so Epic fixes this quickier [Unreal Engine Issues and Bug Tracker (UE-62042)](https://issues.unrealengine.com/issue/UE-62042)

---

<div class="post-metadata">

**Author:** ![Para96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Para96](https://forums.unrealengine.com/u/Para96)\
**Post date:** [July 23, 2018, 7:02pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/9 "2018-07-23T19:02:37Z")

</div>

Can confirm, this fixes the issue everything works now including generate\_body  
One remark though the path contains 2 “/” before YourModuleName (should only be 1)

Thank you very much

---

<div class="post-metadata">

**Author:** ![23456agder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@23456agder](https://forums.unrealengine.com/u/23456agder)\
**Post date:** [March 11, 2019, 11:13pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/10 "2019-03-11T23:13:36Z")

</div>

One way that I found is to delete the folder where the public and the private one are, because in the editor ue4 it does not find them as such, then once the private folder is deleted and in case it saves the files created in that private folder, restart and It was automatically corrected, it’s something foreign to ue4, I hope it helps this …

---

<div class="post-metadata">

**Author:** ![23456agder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@23456agder](https://forums.unrealengine.com/u/23456agder)\
**Post date:** [March 11, 2019, 11:14pm UTC](https://forums.unrealengine.com/t/ue4-20-and-visual-studio-2017-errors/429940/11 "2019-03-11T23:14:16Z")

</div>

Una forma que encontré es borrar la carpeta donde esta el public y el privado, pues en el editor ue4 no los encuentra como tal, entonces una vez borrado la carpeta privado y por si acaso salve los archivos creados en esa carpeta de privado, reinicie y se corrigió automáticamente, es algo extranio de ue4, espero que ayude esto…
