Resolved Namespace not found

milkycow

New member
Joined
Sep 2, 2024
Messages
2
Programming Experience
Beginner
Hi guys,

Apologies if this is a dumb question, however I have created a VS Console Application and added a connected service (TgaOrg) with TgaOrg as the namespace however the TgaOrg namespace is not found when I reference it in the 'using' statement.

See below screenshot

1725259047291.png



I really appreciate any help with this.

Cheers,
Simon
 
Solution
Anyway, I suspect that if you look inside the Reference.cs, the namespace declared for the service you are connected to is not ConsoleApp1.TgaOrg.

The tree like organization of files directly mapping to namespaces is a Java thing. It's never been a C# (nor .NET thing). C# is not Java despite how much people try to claim that C# was invented because MS got shut out of Java back in the 90s. Yes, some people do try to follow the Java file to namespaces conversations, but these are the same people who are also trying to to format their code using the Java One Brace Style, and using camel case for method names -- the horror!
Welcome to the forum. In the future, please post code as text, not as screenshots. Viewing these is difficult on small devices and uses a lot of bandwidth. Also, it make it difficult to try to reproduce the problem: whereas we can just copy and paste the code, we now have to type it all in.
 
Anyway, I suspect that if you look inside the Reference.cs, the namespace declared for the service you are connected to is not ConsoleApp1.TgaOrg.

The tree like organization of files directly mapping to namespaces is a Java thing. It's never been a C# (nor .NET thing). C# is not Java despite how much people try to claim that C# was invented because MS got shut out of Java back in the 90s. Yes, some people do try to follow the Java file to namespaces conversations, but these are the same people who are also trying to to format their code using the Java One Brace Style, and using camel case for method names -- the horror!
 
Solution
Thanks a lot for the reply and welcome. I will ensure to include text code in the future. I have checked the namespace definition and it is indeed "TgaOrg" explicitly. I was assuming I could reference it using the hierarchy of the project name, but this was a big assumption.

Thanks again for the help :)
 

Latest posts

Back
Top Bottom