✅ Reference not recognized
Certain references are not recognized there be must be something very basic that I do not understand here.
44 Replies
well, how are these things referenced?
Via namespace?
3000 messages :/
the assembies that contain them
all ood 😛
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I have able to reference it throughout the project
hrmmm
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
You are making me realize how much I need to learn to even articulate what my issue is.
I have a folder named Misc and several class under it.
with 3000 (???) messages, i assume it's not exactly a small code base
It is
the folder doesn't really matter
the namespace isn't coupled to the folder structure
so if there is simply no namespace called
Server.Misc
then it won't be foundGitHub
GitHub - TheBambino/ServUO: An Ultima Online server emulator writte...
An Ultima Online server emulator written in C# .NET - GitHub - TheBambino/ServUO: An Ultima Online server emulator written in C# .NET
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
No issues here
Can't see any
Misc
directory inside of Server
Nor a Misc
fileGitHub
ServUO/Scripts/Misc at master · TheBambino/ServUO
An Ultima Online server emulator written in C# .NET - ServUO/Scripts/Misc at master · TheBambino/ServUO
They use the
Server
namespaceUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
it may be broke, I can push the latest if you would like
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
GitHub
ServUO/Titles.cs at master · TheBambino/ServUO
An Ultima Online server emulator written in C# .NET - ServUO/Titles.cs at master · TheBambino/ServUO
yeah that'd be a class
not a namespace
Ahhh
you can't add a using directive for a class
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
it's not weird
Even using Server.Misc doesnt work
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
As a side note, although folders do not matter, making sure that namespaces reflect the folder structure does help.
Having to look for
Server.Misc.SomeClass
inside of Scripts
is counter-intuitive at bestUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
love the
#region
on the using directives...Why does it work here?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Holy crap
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes, makes a lot more sense
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
This helps a lot
seems to me like
Misc.Titles.cs
isn't meant to go into the Scripts
project
that project already references the Server
project
so that'd be a circular dependency
cannot workUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
Awesome, thanks yall.