✅ Project A sees one class in Project B, but not both (C#)

I have two C# projects. In one, I declare two classes. One just derives from the other and adds some extra fields. The other project needs to use those classes. The dependant project can reference the base class just fine. But not the derived class. For that, VS 2022 Community insists the derived class doesn't exist. What gives? I keep checking the dependancy references. Those are good.
C#
private readonly System.Collections.Generic.SortedDictionary<string, Data.Defs.UserNetwork>
mapAllNetworksSortedByName = new();

private readonly System.Collections.Generic.SortedDictionary<string, Data.Defs.Network>
mapAllPredefinedNetworksSortedByName = new();
C#
private readonly System.Collections.Generic.SortedDictionary<string, Data.Defs.UserNetwork>
mapAllNetworksSortedByName = new();

private readonly System.Collections.Generic.SortedDictionary<string, Data.Defs.Network>
mapAllPredefinedNetworksSortedByName = new();
C#
namespace BestChat.IRC.Data.Defs
{
public class UserNetwork : Network
{
.
.
.
C#
namespace BestChat.IRC.Data.Defs
{
public class UserNetwork : Network
{
.
.
.
C#
namespace BestChat.IRC.Data.Defs
{
public class Network
.
.
.
C#
namespace BestChat.IRC.Data.Defs
{
public class Network
.
.
.
No description
2 Replies
Omnissiah
Omnissiah14mo ago
try to dotnet build your project instead of compiling from vs, sometimes looking at the compiler output directly you can see some more descriptive messages if you write just UserNetwork instead of Data.Defs.UserNetwork does vs give you a hint? does it search for the class? did you search if there is another UserNetwork class in the project?
Will Pittenger
Will PittengerOP14mo ago
Well, I was needing to move the folder for where the dependant project was at. That fixed it. I had to recreate the project reference, but that was it.
Want results from more Discord servers?
Add your server