[BUG] "Generate Visual Studio Project Files" wrong version of visual studio (2017)

Following settings have been configured:

  • Project Settings → Editor → Platforms - Windows → Compiler Version = VS 2022.
  • Editor Preferences → General - Source Code → Source Code Editor = VS 2022.

Clicking “Generate Visual Studio Project Files” on the .uproject → generates a VS 2017 .sln.
Clicking File > Refresh Visual Studio 2022 Project → Generates a VS 2017 .sln.

On top of that, since I updated the setting from 2019 to 2022 Intellisense has become even slower, opposite to what microsoft claimed.

1 Like

This is in Engine\Source\Programs\UnrealBuildTool\ProjectFiles\VisualStudio\VCProjectFileGenerator.cs:

if (Settings.ProjectFileFormat == VCProjectFileFormat.VisualStudio2022)
{
    VCSolutionFileContent.AppendLine("Microsoft Visual Studio Solution File, Format Version 12.00");
    VCSolutionFileContent.AppendLine("# Visual Studio Version 17");
    VCSolutionFileContent.AppendLine("VisualStudioVersion = 17.0.31314.256");
    VCSolutionFileContent.AppendLine("MinimumVisualStudioVersion = 10.0.40219.1");
}

So it looks intentional. Not sure why though, maybe they just want it to be backward-compatible. The .sln and .vcprojs are very thin wrappers around UBT anyway, so I suspect it doesn’t matter.

1 Like

Also, I’ll mention: I too couldn’t get VS2022 Intellisense even working properly with UE 5. It would underline the UHT macros as errors. I was going to contact the VS team to see what the story is (given the integration is supposed to be all improved), but I tried VisualAssist (Tomato) and that worked really well, and then I tried Rider for Unreal, and that works even better than VS+VisualAssist. Strongly suggest giving Rider a try if you haven’t already: https://www.jetbrains.com/lp/rider-unreal/

Thanks for testing. A bit odd that the version number would be written like that intentionally.
I might give VisualAssist / Rider a try some other day. I’d rather have Microsoft fix their snail software than add another layer of complexity tbh. Intellisense on VS 2022 + UE4-27 gets stuck infinitely on random project variables their type * facepalm *.

Oh wait, I get it now - Visual Studio 2022 is Visual Studio Version 17.x (just to be confusing). Visual Studio 2017 was Visual Studio Version 15.x. Haha:

So everything is correct.

1 Like

Another case of companies who have trouble with counting. :’).
But yes the wiki says 2022 is product version 17, so this must be it.

1 Like