1

How do I add a reference to SharePoint 2007 from C#. What is the name and location of the DLL please?

3 Answers 3

3

You can find the dll here @ this location C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\ISAPI\Microsoft.SharePoint.dll, Adding the reference you need to right click Reference in the VS Project select the above location and add it.

Sign up to request clarification or add additional context in comments.

1 Comment

found it now.... I guess the reason why I was battling to find it is because I can't find a damn thing anymore since Windows Vista Search came along...
3

If you are using source control, I would put your Microsoft.SharePoint.dll DLL into a seperate folder named something like lib, along with your other 3rd party DLLs, and add your project references to there. That way, when a developer gets the source code, the references won't be broken if their environment is set up differently.

2 Comments

I can't imagine a SharePoint developer developing on a machine that doesn't have SharePoint installed... But valid point nonetheless
It's good to remove the environmental dependencies though, and applies to not just sharepoint dlls.
2

The name of the base SharePoint DLL is

Microsoft.SharePoint.dll

and it's normally located in

c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.