How do I install a C# class library in Visual Studio?

1934286 picture 1934286 · Sep 3, 2013 · Viewed 28.5k times · Source

I am trying to use a class library which I found on a different question here.

I am quite new to C#, Visual Studio, and OOP in general, so please excuse me if this is not the right question.

I followed the link and downloaded the zip. The help file does not seem to contain any directions on how to get Visual Studio to utilize the library. I figure that I have to tell it to use the library somehow, but I really don't know what to do. Or maybe I need to copy the .dll to a specific folder. I also assume I need using ... in the top of the .cs files that use it.

How can I use this library in a Visual Studio C# project?

Answer

You should add a reference.

In the project you are working on, you can add a reference to the dll (or a library) by doing navigating to:

(Project)->References->Add Reference

[You will find Properties, References and [class]files below your project]

According to your question, you should add "UltraID3Lib.dll" to your project references and use it through adding a using on top of your project files like this:

using HundredMilesSoftware.UltraID3Lib;

After you have successfully added the resource you should build the project and it will copy all the necessary files to your output directory (bin/Release or bin/Debug).