CS0006 Can't find metadata dll, but paths are correct

I have a project, BestChat.Prefs.GUI.Ctrls.csproj which references the DLL project BestChat.Prefs.Data. I'm getting the error shown below:

Error (active)    CS0006    Metadata file 'B:\Contents\Best Chat\Code\BestChat.Prefs.Data\bin\Debug\net8.0-windows\BestChat.Prefs.Data.dll' could not be found    BestChat.Prefs.GUI.Ctrls    B:\Contents\Best Chat\Code\BestChat.Prefs.GUI.Ctrls\CSC    1        


I don't understand why. The line from BestChat.Prefs.GUI.Ctrls.csproj is <ProjectReference Include="..\BestChat.Prefs.Data\BestChat.Prefs.Data.csproj" />. BestChat.Prefs.Data is one directory up. So the relative path should be correct.

What's going on and how do I fix it?
Was this page helpful?