I'm setting up Visual Studio 2019 on a new Windows 11 PC and VS is unable to load one of the projects in a C# solution. Most of the projects in this solution target .NET Framework 4.5.2, but there is one targeting .NET Core 3.1, and VS won't load the 3.1 project with the following error:
error : The project file cannot be opened. Version 7.0.302 of the .NET SDK requires at least version 17.4.0 of MSBuild. The current available version of MSBuild is 16.11.2.50704. Change the .NET SDK specified in global.json to an older version that requires the MSBuild version currently available.
I've also got VS 2022 installed on the PC for other newer applications.
I'm able to open the project without a problem on a Win 10 PC with both VS 2019 and 2022 installed.
I've searched for global.json, but it doesn't exist. I've also tried uninstalling and reinstalling both VS 2019 and 2022, and installing the SDK for .NET Framework 4.8, .NET Core 3.1, and .NET 7.0.