Problem
When using Rider, a project was targeting the .NET 6.0 SDK even though the intended target was .NET 9.0.6. This caused issues as the project was built under the incorrect framework version, leading to runtime incompatibility.
Cause
The SDK target may have not updated within the project settings after installing the newer version, remaining fixed to the previously selected .NET 6.0 framework.
Resolution
-
Open your project in Rider.
-
Locate the project in the Solution Explorer.
-
Right-click on the project and select Properties:
-
In the properties’ window, identify the Target Framework setting:
-
Change the .NET Target Framework. Note: if the target framework is not in the list, edit the .csproj file to manually set the target framework: Right-click the project | Edit | Edit 'xxx.csproj'.
-
Save the changes and rebuild the project.
Comments
0 comments
Please sign in to leave a comment.