Debugger can not inspect values: Error Type is defined in Assembly that is not referenced, but project reference is there.
Hello community
I have some troubles by using the Debugger in my Blazor WASM Application in Rider. In my Project I used all my Models in a separate ClassLibrary in the same solution as my Blazor WASM Project. I added also project reference to my Models project where all the Types are defined. I am able to compile and run the project without errors, Models.dll files will be also updatet in the bin folder of my Blazor WASM project.
But if I want to use debugger and set a breakpoint somewhere in my program, I can not see the values of that variable which is a type defined in my Models project.
I get the tooltip: Type is defined in Assembly that is not referenced. You must add a reference to assembly Models.
I understand the error but since I have already defined a project reference and the compiler is able to compile and run the project, I can not understand why the debugger has troubles to get this reference.
I did already Rider update, Restart program, remove reference and add it again …
I am using:
MacBook Pro M3
Build #RD-242.23726.100, built on October 22, 2024
Can someone help me to solve this issue?
Thanks in advance
Sam
Please sign in to leave a comment.
I test a similar usage as you mentioned in the latest 2024.3, but didn't see the problem reproduced.
If the problem persist in the last version, could you please share some code sample or a minimal reproducible solution?
You can upload the file to our server and share the ID.
I have a similar issue, but my setup may be unusual.
I'm debugging a Unity program, which is using the Doorstop debugging service. Not via a Unity IDE.
When attempting to inspect an item (in IDE, watch, eval, etc.) it gives a reference error
enabled: The type 'MonoBehaviour' is defined in an assembly that is not referenced.
The project builds without issue. I am able to debug this same project in VS 2022.
JetBrains Rider 2026.1.2
Runtime version: 25.0.2+1-b329.117 amd64 (JCEF 137.0.17-261-b81)
Hello,
Thanks for the report. This should be a known issue tracked under RIDER-50015 The type is defined in the assembly that is not referenced. This issue has been prioritized recently, but there is no ETA yet. Please upvote it to recieve further udpates. We will update the issue once there is any progress.
Regards,
Tom
For my case, I don't believe RIDER-50015 is relevant as the affected types are in .dlls that are directly referenced in the project. Not items from a nuget reference.
Hello Gerstena,
The underlying cause should be same as another issue (RIDER-32739 The type is defined in the assembly that is not referenced) where the affected types are in .dlls is marked as duplicated. That said, I still recommend leaving a comment in the RIDER-50015, and share the following logs, as they may provide additional clues and help speed up the investigation.
Thanks,
Tom