7
votes

I'd like to develop SharePoint 2010 web parts without local SharePoint installation. I mean I don't want to install SharePoint server because I don't need it and it's so huge.

I found some questions about this, but I still can't get it working. I found a blog entry about this: http://techblog.hk.agenda-asia.com/2010/10/29/create-sharepoint-project-without-install-sharepoint-server/

I tried to follow the instructions from that blog. Now I can create SharePoint 2010 projects with Visual Studio. Problem is that Visual Studio cannot find SharePoint dlls. Even if I copy them to local directory and add that folder to registry with key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v3.5\AssemblyFoldersEx\MyAssemblies (like blog entry adviced)

How could I tell Visual Studio where SharePoint dlls are?

2

2 Answers

5
votes

You can get the DLLs from sharepoint from the ISAPI folder in the 14 hive:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

Just copy the dlls to your local computer and reference them in your project to compile.

You will realise it's a great pain when you are debugging/deploying your projects as you wont be able to test your code locally.

UPDATE: The Sharepoint 2010 Evaluation machine is not available anymore. So the information bellow is not current anymore. The best option now is to get Sharepoint 2010 from MSDN, if you have a subscription obviously.

My advice is to get Microsofts 2010 Information Worker Demonstration and Evaluation Virtual Machine (SP1):

http://www.microsoft.com/en-au/download/details.aspx?id=27417

It's a virtual machine with Sharepoint 2010, and it comes with all the tools you need like infopath, and visual studio pre-installed.

The only problem is you will need 2008 server r2 to run it.

I have managed to successfully convert the machine to VMWare and I am happily running it under windows 7 by following instructions from this post:

http://sharepointyankee.com/2010/06/03/converting-the-sharepoint-and-office-2010-information-worker-virtual-machines-to-vmware-from-hyper-v/

Make sure you read the comments on that post as there are a couple of gotchas.

Also make sure you have a somewhat grunty machine. I am running it with an i7 with 8 gig ram, SSD, with 4 cores allocated to the VM and it runs smooth.

0
votes

Ok, to answer the original question:

  1. Copy the SharePoint dlls from an actual SharePoints server (you'll need one of those anyhow) from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI To your dev machine - you do NOT need to place them in a similar structure - choose whatever you want.

  2. In visual studio either reference those dll's directly (add reference, browse) or add a folder to the "reference paths" in the project settings.

  3. If you are multiple people working on the project, you may have problems if you are using different versions/service packs of the SharePoint dlls - then ensure that the reference has the "specific version" flag set to true (every reference)