How do you build 5.8 from source?

I can Setup and GenerateProjectFiles and those ran fine. But I can’t open the solution in either VS 2022 or 2026. Says the project files are incompatible. If I upgrade the solution, it says the UE5 project is incompatible.

After trying a bunch of stuff, I updated VS 2026. I installed .net 10 and the SDK. Opened the project with VS 2026 and when the dialog comes up to upgrade, I clicked ok or whatever the button says to upgrade and it worked this time. I don’t know why it doesn’t produce proper project files.