Search code examples
c#.netclassnotfound

Third party class not loading in 'using'. Where are additional classes installed?


I have a third party library installed, but the accompanying namespace isn't found.

The type or namespace name 'Maverick' could not be found (are you missing a using directive or an assembly reference?)

Fair enough, VS 2010 can't find it. But where does my system look for third party libraries? Can I modify the list of locations?


Solution

  • using does not cause a library to be loaded or referenced. It only makes the classes in that namespace available for use without their namespace prefix.

    Before you can use a library, you need to reference it in your project. Go to the Project menu and choose Add Reference... From that dialog box you can choose libraries that have been installed in the GAC, you can browse to an explicit DLL, or you can reference another project in your solution.