Rider 2024.3 "Error: Selected project was not found." on Run/Debug Configuration and Edit Configuration windows
I have an Azure Function project loaded in Rider.
When trying to debug, I get prompted to fill in fields in the Edit Configuration window.
Two problems I have is that the “Target Framework” is incorrectly set to “net6.0” even though this is a NET 8 project. Here is a snippet of the csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
</PropertyGroup>
I tried the “Manage .NET SDK” menu option on the solution, which created a global.json file that specifies using .NET 8, but that did not fix the problem.
I'm stuck on how to fix this issue, can someone help me out please?
Please sign in to leave a comment.
What's your project type? Are you working with a solution or a single project?
There could be some problem on opening the .sln or .csproj file. The SDK version fallback to .NET 6 automatically due to the failure of opening the project.
Please also ensure you have updated to the latest Azure Toolkit plugin, then have a try with creating a new Azure Functions application in Rider, to see if the same problem occurs.
Tao Sun Ahhhhh, I've spotted that the Azure Toolkit plugin has been failing to update recently. Might be the work network blocking it. That's probably the issue. Thank you, will see if that sorts it out.
Tao Sun I updated the Azure Toolkit plugin.
That did not fix the issue with debugging the Azure Function.
I created a new Azure Function project, which was a simple HTTP triggered function, and placed a breakpoint inside it.
I clicked the “Debug” button in Rider, and everything worked fine. The debugger started the code, ad I was able to hit the breakpoint.
I'm not sure what the difference is between the failing project/solution and this new one I created. In Visual Studio, the failing solution works fine, in that I can debug it. So I don't know what Rider is looking for, which is causing this “Selected project not found” error.
In one of the log files, I am seeing this:
2024-12-05 12:51:04,377 [ 54894] INFO - #c.j.r.r.DotNetRuntime - Detected runtime for project kind null, TFM RdTargetFrameworkId(version=RdVersionInfo(major=8, minor=0, patch=0), shortName=.NETCoreApp, presentableName=net8.0, isNetCoreApp=true, isNetFramework=false), executable "C:\src\Home.QuickQuote.SERVICE\src\Home.QuickQuote\bin\Debug\net8.0\Foo.Home.QuickQuote.dll", detect time: 18ms: .NET Core
Not sure if that might be a clue?
Jason Evans We need to check the log details on the problem for further investigation, you can submit a new support request in Help | Contact Support thus could upload logs to us.
Tao Sun Thanks for the advice, I have submitted a support request.