With the preview version of .NET 6 installed on my Mac, I started seeing this error in Jetbrains Rider while building a new Xamarin application.
The imported project "/usr/local/share/dotnet/sdk/6.0.100-preview.7.21379.14/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props" was not found. Confirm that the expression in the Import declaration "/usr/local/share/dotnet/sdk/6.0.100-preview.7.21379.14/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props" is correct and that the file exists on disk. ...
It turns out the fix for this is to change the
Use MSBuild version: setting in JetBrains rider. To find this setting, it is available in
JetBrains Rider (menu) > Preferences > Build, Execution, Deployment > Toolset and Build
Once you find the Toolset and Build windows, click the dropdown form
Use MSBuild version: and select
15.0 /Library/Frameworks/Mono.framework ... so that it starts building your Xamarin application again with Mono.
Then click save, you can choose to save it for only the current project, the current project but it shared with your team (through source control) or globally on your machine for every project. I would personally only choose one of the first two options as this setting could break other .NET applications that you want to develop within JetBrains rider.
After I made this change and tried to build my Xamarin application, I received a different error requiring a NuGet restore (see error below).
To perform this action in JetBrains Rider, go up to the
Tools (menu) > NuGet > NuGet restore.
Once the restore is complete, you should now be able to build and run your Xamarin application in JetBrains Rider.