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
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?
90 Replies
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
I haven't been able to check it in. Got some new projects. I could 7z it and send it to you that way.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
Well, the project is Best-Chat, but again, I haven't been able to check it in as it stopped compiling. I've been fighting to get it compiling again.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
And delete it later?
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
GitHub
GitHub - ChatZilla-Replacement-Project/Best-Chat at CS0006Debuggin
This is a mockup done in C# and WPF. Some functionality is present. - GitHub - ChatZilla-Replacement-Project/Best-Chat at CS0006Debuggin
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
I don't see any errors on that assembly.
leowest
leowest4mo ago
what if u remove
<DocumentationFile>\bin</DocumentationFile>
<DocumentationFile>\bin</DocumentationFile>
From IRC.Data csproj or replace it with a sane directory or do u have that bin folder set in your system c:\bin
Will Pittenger
Will PittengerOP4mo ago
No. Not there.
leowest
leowest4mo ago
No description
leowest
leowest4mo ago
that was the only issue I had to build
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
I took that line out with no changes.
leowest
leowest4mo ago
well I cloned the project u provided above removed it and it all build
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
Same here.
leowest
leowest4mo ago
which project are u building
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
leowest
leowest4mo ago
git clone https://github.com/ChatZilla-Replacement-Project/Best-Chat.git
cd Best-Chat
git checkout -b CS0006Debuggin
git clone https://github.com/ChatZilla-Replacement-Project/Best-Chat.git
cd Best-Chat
git checkout -b CS0006Debuggin
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
I had the wrong name when I recreated the project. Which one?
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
I know that.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
As I noted.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
No, a DLL.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
I did. I no longer have occurences of "Best_" in any of my text files.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
No, correct namespace is BestChat.GUI.Ctrls.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
Which source was that in?
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
Find in Files didn't find it.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
Ah. ConversationViewCtrl.xaml.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
No it wasn't. It's a missing project in the solution.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
Take 200 mg of Seroquel and call me in the morning—if you wake up in the morning rather than hours later. I made changes to the branch, but it still isn't working. Many of which @TeBeCo and @leowest suggested.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Will Pittenger
Will PittengerOP4mo ago
😉 Sorry.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
leowest
leowest4mo ago
unhappily I couldn't reproduce the same issue tebeco did on the same branch so I can't provide any insight on the matter.
Will Pittenger
Will PittengerOP4mo ago
😦
Omnissiah
Omnissiah4mo ago
little side note Code folder conventionally is src also why so many regions :/
Will Pittenger
Will PittengerOP4mo ago
¯\_(ツ)_/¯
Omnissiah
Omnissiah4mo ago
IRC.Global.View.Ctrls is missing the dependency of project IRC.Data and apparently IRC.Global.View.Ctrls is missing dependency of BestChat.GUI.Ctrls this project is a mess, how did it get in this state also there's an IRC namespace collision, so you have to do this (or solve it in another way)
-eunetWhatsBeingEdited.unetOriginal ? View.Resources.strValidationNameTaken : eunetWhatsBeingEdited
+eunetWhatsBeingEdited.unetOriginal ? global::IRC.Global.View.Resources.strValidationNameTaken : eunetWhatsBeingEdited
-eunetWhatsBeingEdited.unetOriginal ? View.Resources.strValidationNameTaken : eunetWhatsBeingEdited
+eunetWhatsBeingEdited.unetOriginal ? global::IRC.Global.View.Resources.strValidationNameTaken : eunetWhatsBeingEdited
same in PortEditorDlg THEN i guess stuff has been moved because this should change
-<Ctrls:IntegerUpDown
+<GuiCtrls:IntegerUpDown
-<Ctrls:IntegerUpDown
+<GuiCtrls:IntegerUpDown
and this should change too
-xmlns:Ctrls="clr-namespace:BestChat.IRC.Global.View.Ctrls;assembly=BestChat.IRC.Global.View.Ctrls"
+xmlns:Ctrls="clr-namespace:BestChat.IRC.Global.View.Ctrls;assembly=IRC.Global.View.Ctrls"
-xmlns:Ctrls="clr-namespace:BestChat.IRC.Global.View.Ctrls;assembly=BestChat.IRC.Global.View.Ctrls"
+xmlns:Ctrls="clr-namespace:BestChat.IRC.Global.View.Ctrls;assembly=IRC.Global.View.Ctrls"
Omnissiah
Omnissiah4mo ago
ok this thing finally loads (and compiles)
No description
Will Pittenger
Will PittengerOP4mo ago
Never mind. I was in the incorrect version of the project. Hmm. The Resource Editor is using the incorrect namespace. IRC.Global.View isn't BestChat.IRC.Global.View. And I don't see a way to tell it to use the correct namespace. Ah.
Omnissiah
Omnissiah4mo ago
i put it up there this or you mean changing it in the other way
Will Pittenger
Will PittengerOP4mo ago
Correcting which namespace Resources is in.
Omnissiah
Omnissiah4mo ago
i believe you have to change the assembly name or default namespace best thing to me would be not using Resources at all they have always been a hindrance to me
Will Pittenger
Will PittengerOP4mo ago
I started using Rsrcs instead. Which window was that? I just fixed the second in that post. When I recreated the project file, I didn't realize the default namespace and default assembly name were wrong. ConversationViewCtrl had that error. I'm assuming it was there.
Omnissiah
Omnissiah4mo ago
it's mainly two files that had problems conversation view and NetworkEditorDlg
Will Pittenger
Will PittengerOP4mo ago
Well, it isn't compiling yet for me. Still investigating.
Omnissiah
Omnissiah4mo ago
after changing some of this dependencies stuff i would suggest restarting visual studio because it doesn't behave really well
Will Pittenger
Will PittengerOP4mo ago
Done. Didn't help yet.
Omnissiah
Omnissiah4mo ago
what do you get, classes not found?
Will Pittenger
Will PittengerOP4mo ago
Yes. All from XAML.
Omnissiah
Omnissiah4mo ago
then it's either missing a dep to a components project or the BestChat namespace
Will Pittenger
Will PittengerOP4mo ago
Well, I don't see that in NetworkEditorDlg.xaml. It calls on IrcCtrls:ChanServOptComboBox. That's in xmlns:IrcCtrls="clr-namespace:BestChat.IRC.Global.View.Ctrls;assembly=BestChat.IRC.Global.View.Ctrls". And the declaration for the combobox? namespace BestChat.IRC.Global.View.Ctrls { class ChanServOptComboBox : System.Windows.Controls.ComboBox Oh. Ctrls versus Controls. Duh. Nevermind. Controls was in the base class specification. It's the assembly name.
Omnissiah
Omnissiah4mo ago
this then (the second diff) i saw that in the csproj the project should have assembly name BestChat.$(project name) but assembly is output with just project name
Will Pittenger
Will PittengerOP4mo ago
My RESX file isn't being saved to the designer.cs file. Trying to force it to be recreated. But it won't recreate Resources.designer.cs. That csproj was missing an <itemgroup> the other projects had. How does the compiler know when to update the *.designer.cs file? That project doesn't have a *.csproj.user file. Is one needed? What do they do? Ah, it needed the custom build tool ResXFileCodeGenerator. Why was that missing even after I removed the RESX from the project and readded it. I updated the branch in GitHub. If you could try my version again, maybe we'll figure out what's going on. I'm not seeing what's going on with controls from two DLLs: BestChat.Platform.Prefs.Ctrls and BestChat.IRC.Global.View.Ctrls. Both look like the namespaces and assembly names are correct and match.
Omnissiah
Omnissiah4mo ago
i believe that's just settings doeesn't work yet? 😐
Will Pittenger
Will PittengerOP4mo ago
Nope. 😦
Omnissiah
Omnissiah4mo ago
eh i should have made a pr there are a bunch of errors also formatting really sucks (again)
Will Pittenger
Will PittengerOP4mo ago
Formatting?
Omnissiah
Omnissiah4mo ago
yeah some lines are just wrapped at a certain length without real indentation
Will Pittenger
Will PittengerOP4mo ago
Define "real indendation".
Omnissiah
Omnissiah4mo ago
any indendation that is not all the text put in a sequential way until it reaches the end of the view
Will Pittenger
Will PittengerOP4mo ago
And in what was is it not that?
Omnissiah
Omnissiah4mo ago
an array initialization with long names interrupted in random points
Will Pittenger
Will PittengerOP4mo ago
Define random. Got a sample?
Omnissiah
Omnissiah4mo ago
it's full of samples
public PortEditorDlg(in System.Collections.Generic.IReadOnlySet<ushort> ussetPortsInUse, in System
.Collections.Generic.IReadOnlySet<ushort> ussetSslPortsInUse, in ushort usVal, in bool
bModeIsEdit, in bool bEditingSslPort, in System.Windows.Window wndOwner)
{
this.ussetPortsInUse = ussetPortsInUse;
this.ussetSslPortsInUse = ussetSslPortsInUse;
this.usVal = usVal;
this.bModeIsEdit = bModeIsEdit;
this.bEditingSslPort = bEditingSslPort;

InitializeComponent();

Owner = wndOwner;

Title = bModeIsEdit ? bEditingSslPort ? View.Resources.strPortEditorTitleSslEditingMode : View
.Resources.strPortEditorTitleEditingMode : bEditingSslPort ? View.Resources
.strPortEditorTitleSslAddingMode : View.Resources.strPortEditorTitleAddingMode;

iudPortNum.Value = usVal;
}
public PortEditorDlg(in System.Collections.Generic.IReadOnlySet<ushort> ussetPortsInUse, in System
.Collections.Generic.IReadOnlySet<ushort> ussetSslPortsInUse, in ushort usVal, in bool
bModeIsEdit, in bool bEditingSslPort, in System.Windows.Window wndOwner)
{
this.ussetPortsInUse = ussetPortsInUse;
this.ussetSslPortsInUse = ussetSslPortsInUse;
this.usVal = usVal;
this.bModeIsEdit = bModeIsEdit;
this.bEditingSslPort = bEditingSslPort;

InitializeComponent();

Owner = wndOwner;

Title = bModeIsEdit ? bEditingSslPort ? View.Resources.strPortEditorTitleSslEditingMode : View
.Resources.strPortEditorTitleEditingMode : bEditingSslPort ? View.Resources
.strPortEditorTitleSslAddingMode : View.Resources.strPortEditorTitleAddingMode;

iudPortNum.Value = usVal;
}
Will Pittenger
Will PittengerOP4mo ago
So how is it "random"? Looks consistent to me. I wrap when things don't fit on screen.
Omnissiah
Omnissiah4mo ago
lines are interrupted in random places instead of respecting readability
public PortEditorDlg(
in System.Collections.Generic.IReadOnlySet<ushort> ussetPortsInUse,
in System.Generic.IReadOnlySet<ushort> ussetSslPortsInUse,
in ushort usVal,
in bool,
in bool bEditingSslPort,
in System.Windows.Window wndOwner)
{
this.ussetPortsInUse = ussetPortsInUse;
this.ussetSslPortsInUse = ussetSslPortsInUse;
this.usVal = usVal;
this.bModeIsEdit = bModeIsEdit;
this.bEditingSslPort = bEditingSslPort;

InitializeComponent();

Owner = wndOwner;

Title = bModeIsEdit
? bEditingSslPort
? View.Resources.strPortEditorTitleSslEditingMode
: View.strPortEditorTitleEditingMode
: bEditingSslPort
? View.Resources.strPortEditorTitleSslAddingMode
: View.Resources.strPortEditorTitleAddingMode;

iudPortNum.Value = usVal;
}
public PortEditorDlg(
in System.Collections.Generic.IReadOnlySet<ushort> ussetPortsInUse,
in System.Generic.IReadOnlySet<ushort> ussetSslPortsInUse,
in ushort usVal,
in bool,
in bool bEditingSslPort,
in System.Windows.Window wndOwner)
{
this.ussetPortsInUse = ussetPortsInUse;
this.ussetSslPortsInUse = ussetSslPortsInUse;
this.usVal = usVal;
this.bModeIsEdit = bModeIsEdit;
this.bEditingSslPort = bEditingSslPort;

InitializeComponent();

Owner = wndOwner;

Title = bModeIsEdit
? bEditingSslPort
? View.Resources.strPortEditorTitleSslEditingMode
: View.strPortEditorTitleEditingMode
: bEditingSslPort
? View.Resources.strPortEditorTitleSslAddingMode
: View.Resources.strPortEditorTitleAddingMode;

iudPortNum.Value = usVal;
}
anyway i think i'm getting to a compilable code
Will Pittenger
Will PittengerOP4mo ago
I find them readable. Though I have a friend who still names everything with names like P, Q, and z. He makes everything static in as few classes as possible and those are all global. He insists it's readable.
Omnissiah
Omnissiah4mo ago
everyone's got his schtick, that's why conventions exists this has literally no structure
Title = bModeIsEdit ? bEditingSslPort ? View.Resources.strPortEditorTitleSslEditingMode : View
.Resources.strPortEditorTitleEditingMode : bEditingSslPort ? View.Resources
.strPortEditorTitleSslAddingMode : View.Resources.strPortEditorTitleAddingMode;
Title = bModeIsEdit ? bEditingSslPort ? View.Resources.strPortEditorTitleSslEditingMode : View
.Resources.strPortEditorTitleEditingMode : bEditingSslPort ? View.Resources
.strPortEditorTitleSslAddingMode : View.Resources.strPortEditorTitleAddingMode;
and without knowing what it is you have to follow all the ? : to understand how it works with even a minimal indentation (which you can take advantage of to enrich the experience, let's say) everyone can immediately visually parse that it's a relatively simple nested condition but again everyone manages his projects to his likings, conventions are not dogmas im down to 1 error, but essentially i think it works i touched 16 files to make it work (well one is .gitignore) i'll make a pr nope i can't because github is stupid retrying done
Will Pittenger
Will PittengerOP4mo ago
With <ProjectReference Include paths, what are the paths relative too? I thought it was the location of the csproj file that incldues them. But it insists on adding duplicates only the duplicates are relative to the wrong locations.
Will Pittenger
Will PittengerOP4mo ago
Stack Overflow
Relative paths in *.sln *.csproj files of c# .NetStandard project
Basically what the titles says. I have a .NetStandard library which I am working on from both windows and linux. My issue is that the reference paths are fully specified. Let's say in this case, I...
Will Pittenger
Will PittengerOP4mo ago
I closed the pull request and made the changes manually as some were junk like indentation "fixes" that broke the indentation. Not indenting inside the #region of a cs file is stupid. It makes it harder to follow the code. Also, some of the one-line constructors were remaining that way as more code was anticipated. But there are still issues and I checked those into the branch.
Omnissiah
Omnissiah4mo ago
i know, it's visual studio applying standard formatting settings there is an .editorconfig in the project but it's practically empty
Will Pittenger
Will PittengerOP4mo ago
I'm going to look at your changes. I'm thinking of moving everything over to Avalonia and rearranging stuff when I do that. So I may have to fix a lot of this again. 😦 Huh? In PluginsExtWhereToLookPage.xaml, you put </PrefsCtrls:VisualTabCtrl> immediately after <grid>. Nothing but whitespace in between. In PrefsGenericTreeListerPage.xaml, you changed xmlns:local to xmlns:Things, but didn't change all the places the local namespace was used. What effect would changing that namespace name have? Any?
Omnissiah
Omnissiah4mo ago
it was just a temp commit to try make it compile first i put all the stuff back after no effect, i was testing the xaml
Want results from more Discord servers?
Add your server