[HELP] I can't reopen my project anymore after creating a new C++ class.

Hello, I encountered a problem with my project. I tried to creat a new C++ class, wrote a little function into it and i tried to compile the code. VS tells me I have the following problems:

"#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (E:\\Unreal Engine Projects\\Portal\\Portal\\Source\\Portal\\PortalFunctionLibrary.cpp)."

"#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (E:\\Unreal Engine Projects\\Portal\\Portal\\Source\\Portal\\PortalFunctionLibrary.cpp)."

"cannot open source file \"PortalFunctionLibrary.generated.h\"

After this I tried to open the editor but I can’t do that anymore, I get the following messages:

"The following modules are missing or built with a different engine version:
Portal
Would you like to rebuild the now?"

After clicking yes i get this:

“Portal could not be compiled. Try rebuilding from source manually.”

I already tried to Generate Visual Stuudio project files, I tried to delete .vs, Derived Data Cache, Intermediate, Saved and the code workspace

Didn’t work. Does anyone know how I could solve this?



I have found that sometimes UHT doens’t pick up changes to files, especially if altered from external sources, and in those cases I just had to make any change to the header file (like add a space and delete it and then save), and then generating project files actually generates the .generated.h file properly