I think one of the biggest questions that I see being asked by new comers to SharePoint development is “Where can I download Microsoft.SharePoint.dll??” or “Where can I get my hands on Microsoft.SharePoint.Portal.dll ??”.
Well the answer is simple, these assemblies can be found on your server that is running SharePoint. Simply copy these assemblies from your SharePoint server to your development machine and reference them.
Because these assemblies are multi-part, you may witness errors/warnings such as ‘The dependency ‘dqsprvm’ could not be found.’. You can more than likely ignore these, but if they end up being show-stoppers, you might want to export the missing dependencies from the GAC of the server and place them within the GAC of the development machine. You can map the GAC to a virtual drive using the subst tool. (subst g: c:\windows\assembly\GAC) where g: is your virtual drive.
What I also recommend is installing the SharePoint Products and Technologies 2003 Software Development Kit (SDK):
I also recommend that you install the visual studio web part templates which will allow you to build web parts much quicker:
http://www.microsoft.com/downloads/details.aspx?FamilyID=CAC3E0D2-BEC1-494C-A74E-75936B88E3B5&displaylang=en
So where are the assemblies anyway?
%SYSTEMDRIVE%\Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI
Where %SYSTEMDRIVE% generally translates into C:\
(C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI)
In this directory, you will find all of the binaries for SharePoint, as well as most of the ASP.NET pages and ASP.NET web services that SharePoint exposes. So if you ever wanted to add a new web service into SharePoint, this is the place to deploy it (be careful with that one, though)!
Hi Matthew,
How do I check if I have the full Sharepoint version downloaded or just the Portal Services.
I can only find Microsoft.SharePoint.dll
in C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI
However Microsoft.SharePoint.Portal.dll
exists in C:\Windows\assembly
but I cant reference it from there.
Thanks,
Josh
Hi Josh,
You can check what version(s) you are running by going into your add/remove programs listing on the server. You should see Windows SharePoint Services 2.0 (ability to reference Microsoft.SharePoint.dll) and if you have SharePoint Portal Server 2003, it will be listed there and you should be able to then find Microsoft.SharePoint.Portal.dll)
You say you can find Microsoft.SharePoint.dll – so that’s all good. You say that Microsoft.SharePoint.Portal.dll exists in c:\windows\assembly which means you *do* have Portal Server installed.
You can easily extract the files by opening a command prompt and typing subst k:\ c:\windows\assembly\gac
Then, go to start -> run and type k:\ and hit enter.
this will give you a folder listing of all the items in the GAC.
You should now be able to extract the Microsoft.SharePoint.Portal.dll (you can perform a file-search if you cant find it).
HTH,
Matthew Cosier
Thanks Mathew,
Cheers,
Josh
[...] .NET development Have you made a reference to the SharePoint DLL? See if this helps you out. http://cosier.wordpress.com/2005/08/…r-development/ The dev forum (microsoft.public.sharepoint.development_and_progr amming) could probably help out [...]