✅ 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.
2 Replies
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?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.