CS0006 metadata file could not be found on build in Rider
I am experiencing build problems with several c# solutions in Rider (both net8 and net9).
After a solution was building and working as expected, sometimes after getting git update, sometimes after switching between branches, the solution stops building.
1. it says that CS0006: metadata file for xxxx.dll that this project is referencing could not be found
2. running `dotnet build` from the command like builds the solution as expected
3. running `Build whole solution` does not help
4. cleaning .idea, bin, obj folders does not help
5. `Reload all projects` does not help
6. `Rebuild solution` does not help
so what works most of the time is that I need to expand the solution, individually select every project (multi-select) and do `rebuild selected project`. Why `Rebuild solution` does not help, but selecting each project separately helps is a mystery to me.
I check the path of the dll where the error is pointing to and the dll is not there after the build.
it does not look like there is a difference if I target a single or multiple frameworks.
what could be the problem?

JetBrains Rider 2024.3.6
Build #RD-243.25659.34, built on February 27, 2025
Runtime version: 21.0.6+8-b631.39 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.1.0-31-amd64
LMDE 6 (faye); glibc: 2.36
.NET Core v8.0.11 x64 (Server GC)
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4000M
Cores: 16
Registry:
ide.experimental.ui=true
terminal.new.ui=true
llm.show.ai.promotion.window.on.start=false
Non-Bundled Plugins:
com.intellij.resharper.HeapAllocationsViewer (2024.3.0)
squirrelsong-light (2.0.5)
avalonia-rider (1.5.2)
Thursday (0.1.6)
dev.turingcomplete.intellijdevelopertoolsplugins (6.3.0)
fr.socolin.application-insights-debug-log-viewer (2024.3.1)
de.docs_as_co.intellij.plugin.diagramsnet (0.2.6)
Abc.MoqComplete.Rider (2024.1.1.1)
com.intellij.resharper.StructuredLogging (2024.3.0.353)
com.intellij.plugin.adernov.powershell (2.8.0)
com.intellij.mermaid (0.0.24+IJ.243)
ru.adelf.idea.dotenv (2024.3)
com.intellij.ml.llm (243.23654.270.15)
net.seesharpsoft.intellij.plugins.csv (4.0.2)
com.intellij.resharper.azure (4.3.9)
Current Desktop: X-Cinnamon
Please sign in to leave a comment.
In the Toolset and Build settings, try to disable “Use ReSharper Build” to see if there is any improvement.
It indeed helped. Thanks!
What do I lose by not using ReSharper Build?
As you mentioned
dotnet build
works perfectly, without ReSharper Build, Rider will build the project as same as the CLI. To investigate further into the issue, you can submit a new support request in Help | Contact Support. To collect further information about the problem.