False errors in Blazor component in editor which disappear after invalidating caches and restarting Rider
JetBrains Rider 2024.2.2 on Windows 10
Blazor .NET 8 project
While I am editing a razor component, the editor suddenly shows many red underlines, indicating errors. The build window shows no errors. I can run the app. In order to get rid of the errors from editor, I need to reopen Rider. Reopening the component file or rebuilding the solution doesn't help.
The errors are of 3 types:
1. Ambiguous reference
2. Member with the same name is already declared (for variables/properties)
3. Member with the same signature is already declared (for methods)
Here is an example for the _query
variable:


As you see, the two "ambiguous" references for _query
are references to the same variable in the same file (or so it looks).
I should mention that reopening Rider gets rid of the errors inside Editor. However, the status bar and the View>Tools>Problems window still show the same errors.

For this to disappear it's necessary to invalidate caches and restart Rider.
Please sign in to leave a comment.
Could you try with the latest Rider version? We released some fixes for false-positive code inspections.
If the problem persists, please reproduce the issue and collect the full log bundle, I will check it further.
Please upload the file to our server and share the ID.
The errors I described are gone since about two weeks or so, although I haven't yet upgraded Rider. Coincidentally, my AI assistant sub ended about two weeks ago, too. If I notice the error again after upgrading Rider I'll update this post.