UE4 / Visual Studio Problem opening/generating files

Hello everyone,

I have a strange problem with my computer. Whenever I try to add code to my project it fails to generate some of thos *.generated.h and VS2013 says: Error: cannot open source file *.generated.h

I have Windows 8.1 64bit. This problem started to happen when I move to Windows 8.1, back in 7 it was working fine.

I have UAC turned off, tried running everything as administrator but nothing helps. Any idea?

Have to close the Unreal editor then build the project from VS2013, it should work then. (At least that’s what I think needs to be done, only thing that’s worked for me.)

I closed the editor and compiled the code with errors… it compiled and now works… Thanks for the help :slight_smile:

I’ve just started seeing the same error with UE 4.20 final build and VS 2017 running on Windows 10. I created a new, clean C++ side scroller project with no starter assets and it worked fine until I added a new C++ class from the editor. Now, the C++ solution file shows 89 errors. Deleting the <Project>.vs, Binaries, Intermediate and Saved folders resolves the issue temporarily until the next C++ class is added from the editor. Seems to me there’s a new bug in UE 4.20 which is causing this behavior.