Just created a .dll file that has some methods. And I have a another project with a class library and client application that reference between each other and work fine.
The problem is that I reference the .dll I just created in the class library but cant use the methods that are available in the .dll. (I can see them in the object browser and everything looks fine).
Like when I try:
Cache cache = new Cache("blabla");
I get:
The reference i made.Cache’ is a namespace but is used like a ‘type’.
But when I add reference in the client application (which is a console app). Then I get no problems and can use the methods easily. Why Does is give my problems in the class library ??
any suggestions
This is simply a naming conflict with a namespace that is in scope and features the word
Cachein it, likely at the end (something likenamespace MyCompany.MyNamespace.Cache { }).You need to fully qualify the type in-line or untangle the namespaces and use
usingstatements at the top:Try to follow the namespace naming guidelines to avoid this situation: