Error adding namespace

After many efforts and searching, I decided to ask a question. I have a dll that I added to my project, and after adding the namespace it shows an ie error,

Mistake 1. Using the namespace directive can only be applied to namespaces; 'Captcha' is a type, not a namespace

enter image description here

When I added this DLL to another project, it works fine, but does not know what is happening in this project. I cleared the solution, added the dll and link again, but still the same error.

Edit: - ddl

enter image description here

After removing the dll, I typed in a cap, but Intellisense shows nothing in relation to captcha. enter image description here

+7
source share
1 answer

even after reading the comments, I'm sure you have a Captcha type hiding somewhere.

You can try the explorer object or check inside other DLLs that you referenced (the fact that Captcha.dll works for other projects can tell you which DLL to check first).

But the VS post gives you pretty clear: you have a Captcha type somewhere. I found this to be the case where Intellisense continues to work, even if the compiler complains.

I hope to put you on the right track.

Good luck

Edit: just clarify. A type can be a class, structure, or enumeration.

Edit2: I just noticed that you have a bin folder included in your project. Well, this is usually a very bad idea. The bin folder should be excluded from the project (right-click, then "Exclude folder from project"). Then you should check your recommendations. To be sure, delete all of them and also clear the folder folder. Then link to the dll via nuget or browse to the lib folder. If you have files in the bin folder, "bad things happen."

+1
source share

All Articles