Click here to Skip to main content
15,616,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The type or namespace name could not be found

What I have tried:

I added reference. Where is the error?
here is the error message
Updated 1-Jan-22 5:08am

1 solution

The error message means what it says - it doesn't know what the class name you used is.
If you've added the reference to the containing assembly, that isn't necessarily enough - you will probably also need a using statement at the top of each source code file.

Hover the mouse over the "red squiggly line" marked class name, and a little drop-down will appear to the left - open that and you will get options to help fix teh problem. Select "using" and it will add the line you need for you.
Share this answer
KenDzz 1-Jan-22 6:30am    
I can't fix the error your way. Can you give me your contact information? We can talk directly
OriginalGriff 1-Jan-22 6:40am    
Nope. I already get hundreds of emails a day, and don't need any more! :laugh:

This is a public Q&A forum for a reason - so others with a similar problem can learn from it as well.

What - exactly - did you try, and what - exactly - happened?
KenDzz 1-Jan-22 7:19am
Here is a detailed video.
Adam Flow 1-Jan-22 7:34am    
This looks like the usual Visual Studio hickup to me.
At 0:32 you clicked on the error entry and jumped to the code line for Sys_Users_SkillBooks.
It was underlined red for a second and then went fine.
Try to cleanup the solution, restart Visual Studio and rebuild your whole solution again.

I encounter this "phenomenon" too, occasionally. Especially when i switch between different solutions.

If you have Resharper installed, you can also do a Cache Cleanup.
OriginalGriff 1-Jan-22 7:42am    
Your first error message refers to a file called "ActivateElf.cs" which isn't even open on your screen.
The one you follow goes to Skill.cs which doesn't include the using line (0:41 timeline)

As I said, "you will probably also need a using statement at the top of each source code file."

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900