The UE5 Project in Visual Studio does not add all source directories in its include Include Directory

Hello all, When I open Character.cpp, I found that all the included items are invalid, it look like so:


so,I go to Property of Project UE5, I found that there are only a few Windows includes left in the include Directories.

so, How do I fix this?
Do I need to manually add them one by one? Or is there another way?

Thanks for any suggestions!

The only solution I know - just accept it. VS doesn’t know about UE features (expecially about UBT), also UE4/5 is a HUGE project, so VS just go mad and always shows something like this. So, even when VS show you a lot of errors, it doesn’t mean that you make everything wrong.
The only IDE which works perfectily with UE project I know is Rider from JetBrains, but you need pay to use it.
Maybe there is a solution to fix all problems with VS and UE, but I don’t know them.

The solution is to install Rider. It has native support for Unreal that is far superior to Visual Studio. https://www.jetbrains.com/lp/rider-unreal/

From the editor, do:

image

and then when you reload the project in VS, it’ll probably take a while to fill in all of it’s data.

Rider is a possible option, but still needs the project files setup. My personal experience with Rider is that it’s great for exploring code, terrible for writing it, and even worse for debugging it.

1 Like

I know that I do not make anything wroing. It’s just inconvenient for me to check out the source code by using F12. :smiling_face_with_tear:
Think you anyway~

It seems that UE5 does not have this option(Refresh Visual Studio Project).
But someone on the Internet said that right click the project file(xxx.uproject) and selete “Generate Visual Studio project files” has the same effect.
So I have tried that delete all files except “Config, Content, Source, MyProject.uproject” and regenerate the .sln file. But it does not work for me.

hmm. Someone who doesn’t have a source tree with a bunch of stuff they can’t expose could paste in the include paths they are using… like from a fresh install. i don’t have a fresh install that isn’t littered with proprietary goods though, sorry.

Why did you find Rider terrible for writing and debugging code? (I assume by implication that you find Visual Studio better for writing and debugging code, or do you find VS terrible too?)

Well, what I found to be great on it, is the ability to see even Blueprint references to code – so I can see a list of all blueprints that are dependent on a particular piece of code pretty quickly. As well, once it’s indices are built (which took a couple of days) it is usually much, much faster at finding various things than VS intellisense. Which makes it very good for exploring things. Sadly, all editors seem to be missing a feature that would be utterly amazing – “Find In All Super/Subclasses”. That was a feature of an editor that was used in the UnrealScript days, and it was amazing. It blows my mind that no one has done that in any other editor that I’ve yet seen.

As far as writing, the entire editor feels like a super clunky 1995 era Java app (which is possibly what it’s based on) that is extremely slow, has a completely foreign keymap, and a mystifying user interface based on said 1995 ideas “Java runs on everything, so let’s make an interface that doesn’t actually resemble the native OS”.

As far as debugging goes, the debugger is just … awful. It’s hard to quantify, but the debugger in Rider more closely resembles the extremely difficult to operate design of Visual Studio Code’s debugger versus the extremely easy to use Visual Studio debugger.

once it’s indices are built (which took a couple of days) it is usually much, much faster at finding various things than VS intellisense.

What year was this? What machine do you have? The first time it indexes a new unreal project takes about 10 mins for me, and the index is persisted, so the second time you open it only takes a minute to load. I have a fairly high end machine though (Intel Core i9 12900LF / 64GB / RTX 3070Ti), so I can imagine it would take longer on slower machines?

Sadly, all editors seem to be missing a feature that would be utterly amazing – “Find In All Super/Subclasses”. That was a feature of an editor that was used in the UnrealScript days, and it was amazing. It blows my mind that no one has done that in any other editor that I’ve yet seen.

I’m not sure, but Visual Studio doesn’t have that either right?

As far as writing, the entire editor feels like a super clunky 1995 era Java app (which is possibly what it’s based on) that is extremely slow,

Again, I suspect this is related to either the machine or the version of Rider you were using. I find no UI lag at all and certainly no lack of responsiveness compared to Visual Studio.

has a completely foreign keymap, and a mystifying user interface based on said 1995 ideas “Java runs on everything, so let’s make an interface that doesn’t actually resemble the native OS”.

Ummm, in these aspects Rider seems very similar to Visual Studio to me. Are there specific keys or something that you’re thinking of?

As far as debugging goes, the debugger is just … awful. It’s hard to quantify, but the debugger in Rider more closely resembles the extremely difficult to operate design of Visual Studio Code’s debugger versus the extremely easy to use Visual Studio debugger.

Ummm, the debugger in Rider seems very similar to the Visual Studio debugger. You set a break point by clicking next to the line of code. You start debugging by clicking Debug. You can step into / out / over / resume / break. You can see the value of variables in the variables panel and written next to them in the code. You can set watchpoints. What features of the Visual Studio debugger do you miss from Rider? I haven’t so far.

I get the strong feeling that your experience of Rider is based on an old version. I only started using it in the last 12 months, so my experience is based on the latest version.

i7-10k, 48gb ram, was using the last public version of Rider for Unreal before it became payware. Since I can’t access it anymore, I can’t open it to provide anything much more specific, sadly.
It’s likely not useful for on device debugging, although I haven’t attempted to find out, because using it’s debugger was pretty painful. That’s a pretty significant feature if it’s not there. Otherwise, my recollection was that it was either missing or difficult to get at seeing the proper call stacks and variables, any advanced breakpoint stuff was missing or also difficult to find. Basically, everything in Rider is more difficult, if it can do it.

I think the only key combinations they share are Ctrl-S and Ctrl-T, otherwise I’m just all over the place in Rider. Like, who prints source code? Why is that even on a keybind? :smiley:

Anyway, my recommendation is to fix the problem with the VS project, VS is both free and the standard. Rider imports the VS project anyway, so it might well be just as broke. But if Rider works and VS doesn’t, there’s an indication that something in the configuration is wrong.