[c#] How to add dll in c# project

I am trying to add a [Science.dll] in my project which should be staright forward. But I am getting a problem. Can someone tell me why?

My C# project which I just copied from internet.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.ComponentModel;
using System.Data;
using Science.Mathematics.VectorCalculus;



namespace using_science_dll
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>`enter code here`
    }
}

C:\Csharptutorial\using_science_dll\using_science_dll\Program.cs(7,7): error CS0246: The type or namespace name 'Science' could not be found (are you missing a using directive or an assembly reference?)

Is it because I am using VS 2008?

Science.dll will run in the following frame .Net 4.0 and Visual C# 2010 Express

enter image description here

This question is related to c#

The answer is


In the right hand column under your solution explorer, you can see next to the reference to "Science" its marked as a warning. Either that means it cant find it, or its objecting to it for some other reason. While this is the case and your code requires it (and its not just in the references list) it wont compile.

Please post the warning message, we can try help you further.


Have you added the dll into your project references list? If not right click on the project "References" folder and selecet "Add Reference" then use browse to locate your science.dll, select it and click ok.

edit

I can't see the image of your VS instance that some people are referring to and I note that you now say that it works in Net4.0 and VS2010.

VS2008 projects support NET 3.5 by default. I expect that is the problem as your DLL may be NET 4.0 compliant but not NET 3.5.