43

I just installed the SharePoint SDK on my machine, but I can't seem to find the location of Microsoft.Sharepoint.dll so I can add a reference to it.

It's not in the GAC or C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\ and a search comes up with nothing.

Any suggestions?

Ryan Smith
  • 8,344
  • 22
  • 76
  • 103
  • At least in 2017, you can get this dll by adding the "SharePoint" package from Microsoft via NuGet. – Harry Pehkonen Aug 30 '17 at 17:40
  • I don't understand why this is not related to programming. I need to do some programming on a project that references this DLL. I got the project from the SCC repository, and the reference is broken. I therefore need to know where the DLL is. I therefore need to learn that, [bizarrely](https://stackoverflow.com/questions/332906/where-is-the-location-of-microsoft-sharepoint-dll#comment20555054_332967), I should [only do such programming on the server](https://stackoverflow.com/a/332967/385844). Voting to reopen. – phoog Oct 08 '19 at 21:07

3 Answers3

47

Just FYI, I found it on the server where SharePoint was installed at:

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

Ryan Smith
  • 8,344
  • 22
  • 76
  • 103
  • 10
    Yep, and for SP2010, it's now here: `C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI` – James McCormack Sep 23 '10 at 09:35
  • 11
    Yep, and for SP2013, it's now here: `C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI` – Nacht Mar 13 '13 at 01:56
  • 1
    In 2015, an easy way to get the DLL quickly is to spin up an Azure Virtual machine using the SharePoint image. Delete the machine once you've copied the DLL's. This is way faster than downloading and attempting to install SharePoint server (installation image weighs in at 2.5 gb). – Sid James Sep 22 '15 at 08:15
  • 1
    This is really helpful. I feel as if the accepted answer here doesn't really answer the question – Bassie Sep 29 '16 at 09:31
21

The dll is on the server where you installed SharePoint. You should not develop on a desktop machine, create a virtual machine with SharePointserver installed and work there. See: http://weblogs.asp.net/erobillard/archive/2007/02/23/build-a-sharepoint-development-machine.aspx

Nat
  • 14,175
  • 5
  • 41
  • 64
  • 2
    Yes exactly, this is the correct way to develop around SharePoint - on the server.... – Michael L Dec 02 '08 at 16:51
  • 87
    God forbid I try to build a sharepoint solution on a computer without sharepoint installed. Oh yeah, I get it. It's a "platform". My ass. – Sleeper Smith Feb 05 '13 at 01:02
  • 17
    There are scenarios where you need this DLL to be available without SharePoint installed, for example, on a Build Server. – Ryan Shripat Jul 31 '14 at 13:13
2

It might show up in the "add reference" dialog anyway - 99% of the time you don't reed to know the physical location. Look in the ".Net" list, which is sorted alphabetically.

I assume the SDK installer would assert this, but Sharepoint development also requires a server OS.

GalacticCowboy
  • 11,663
  • 2
  • 41
  • 66
  • The .NET list was the first place I looked as I would have assumed it was there. I'm developing User Controls that make use of the SmartPart to get loaded in SharePoint so I can develop on my local machine. I figured I would just add the test and copy it up, but I can't seem to find it anywhere. – Ryan Smith Dec 02 '08 at 04:57