Click here to Skip to main content
16,003,319 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I have a problem I want to add a reference to my program in C #:

using AForge;

but C # has given me this exception

The type or namespace name 'AForge is not found (a using directive or an assembly reference missing it *?)


What should I do???

thank you in advance
Posted
Comments
Sergey Alexandrovich Kryukov 6-Jun-13 19:00pm    
Sorry, you need to read at least some introduction to .NET and C#, before getting to something more complex than simplest applications. Why won't you just look through Visual Studio UI to learn where all the pedals and levers are? This is easier than asking such questions and waiting for answers.
—SA
[no name] 6-Jun-13 19:39pm    
Well I hate to tell you this but if I were getting this error, I would probably add a using directive or an assembly reference.
Sergey Alexandrovich Kryukov 6-Jun-13 21:20pm    
Sorry, no. It's not "or". Assembly reference is a must, but "using" is not required, it's just allows to short top-level type names and has nothing to do with assembly-based modularity.
—SA
[no name] 6-Jun-13 21:43pm    
Uhm.... yes... if I were getting that error, I would add an assembly reference or a using statement. There is no "no" about it.
Sergey Alexandrovich Kryukov 6-Jun-13 22:50pm    
There is "no", believe or not. Just "using" cannot help, and "using" is not required, and adding reference is absolutely required...
—SA

1 solution

You will need to add a reference to the AForge assembly to your project. Right Click n the project and select Add Reference.

Once you have added a reference to your project, in your source you can either refer to the classes using fully qialified names (AForge.something.SomethingElse) or you can ad a 'using' like using Aforge.something; and then refer to the classes in that namespace directly.
 
Share this answer
 
Comments
Hadjer91 7-Jun-13 15:45pm    
I added a reference AForge to my project ,now it works thank you

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