skip to Main Content

I was using UE5 with VSCode perfectly fine, and Intellisense and #include were both working fine. But when I made another C++ class in the editor, suddenly my Intellisense stopped working and I was getting red squiggleys under my includes. The code still worked fine but I was annoyed. so I deleted my Intermediate and Binaries folder and tried to rebuild to solve the issue, but it said I had to rebuild from the source. When I checked back, it said it couldn’t open "CoreMinimal.h", so I edited the includePath setting to go to where my CoreMinimal.h file was (C:UsersUsernameDocumentsMy GamesUE_5.1EngineSourceRuntimeCorePublic). But when I went back to check my includes, it said it "cannot open source file "UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h" (dependency of "CoreMinimal.h")".

I tried looking up the issue, but there wasn’t much there. The only solution I could find was to Generate Visual Studio Project Files, but that did nothing. I also tried installing a GitHub extension to help this issue, but it hasn’t helped either.

I can’t even open my UE5 project because of this, would love some help/advice.

I’ve tried deleting Intermediate, Binaries, and saved folder, but it didn’t work, and neither did deleting .vscode and regenerating it. I can’t even really find UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h in my folders. I’m also not getting the prompt to modify the file and choose to reload all after completion or regenerate the project solution.

3

Answers


  1. Chosen as BEST ANSWER

    Issue is resolved. When VSCode asked for a file location to access my .cpp and .h files, I located it to my project folder where my .uprojects were, it fixed the issue.


  2. In your workspace folder, look for .vscode/compileCommands_Default.json

    Add then add your new source code and header there.

        {
            "file": "F:\ind\your\path\to\new\source.h",
            "arguments":.... Same as other {} above ....
                     "directory": ... same
        },
        {
            "file": "F:\ind\your\path\to\new\source.cpp",
            "arguments":.... Same as other {} above ....
            "directory": ... same
        }
    
    Login or Signup to reply.
  3. What did for me was to refresh visual studio code project from inside U5: tools -> refresh visual studio code project

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search