I was able to load the project in VS2022 and failed to load it in Rider IDE. The error was resolved after installing dot net SDK 8.
Steps: Verify if you have the correct Dot net SDK install (dotnet --list-sdks)
If not then install the correct SDK, verify the version, and try loading the project