In my case, installing the right SDK in Visual Studio Setup and updating Rider helped. Something like this: VisualStudioSetup.exe → modify → components
Sorry about the screenshot =)