Referencing the SharePoint DLL

Using Visual Studio 2010 and SharePoint 2010 you will notice that the SharePoint DLLs are not listed in the Add Reference > NET tab.

Follow the next steps to add a SharePoint DL reference:

In Visual Studio 2010, right click your project and select Properties

Go to the Application tab and set the Target framework to 3.5

Go to the Build tab and set the Platform to x64

Go to your project in the Solution Explorer and select Add Reference.

Browse to the ISAPI folder in the SharePoint root to add the SharePoint DLL.

But, instead of these 5 steps above you could also install CKS Development Tools Edition (http://cksdev.codeplex.com/) to make this a lot easier. You can install the CKS Development Tools via Tools > Extension Manager. After installing you will notice a new SharePoint tab in Add Reference which makes it very easy to add a reference to the SharePoint DLL.