How to Perform SharePoint Development On A Client Workstation

One of the most difficult restrictions for a SharePoint developer to deal with can be the requirement to do development on a SharePoint server.  Personally, I prefer doing my development on my local machine, eliminating the need to establish a remote desktop connection to a different machine in order to write code.

Unfortunately, SharePoint development requires many DLL files which are included with an installation of SharePoint on a server.  To make matters worse, SharePoint 2010 requires an x64 server, further complicating the issue.  Fortunately, there is an easy workaround that can allow a SharePoint developer to be productive, even while using their laptop on the road without an available internet connection.

Copy the SharePoint DLLs

As I mentioned before, SharePoint development requires DLL files that are included with a SharePoint 2007 or 2010 installation.  The first step is to grab these off of a SharePoint server.  For SharePoint 2007, they are located in the hive at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\, and for 2010 at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAP\.  Copy the DLL files in this directory from the server, and paste them at the exact same file path on your local machine.  Since your PC likely does not have SharePoint installed, you may have to create the directory structure yourself.

SharePoint 2007 DLL Directory
SharePoint 2007 DLL Directory

Register the Assemblies to the GAC

Now that you have the DLL files on your workstation, you will be able to include them as references in your Visual Studio projects just as you would with any other DLLs.  However, if you want them to auto-register with your project when you use a Visual Studio 2010 SharePoint template or a WSPBuilder template, you must register the DLL files in your local Global Assembly Cache.  To do this, open the directory on your workstation that contains the SharePoint DLLs and drag them into the C:\Windows\assembly\ directory.  This will register them with the GAC on your workstation, and Visual Studio should successfully find the assemblies when a template is loaded up.  Although these assemblies may be 64-bit, this will work fine even though your workstation may be 32-bit.

Global Assembly Cache
Global Assembly Cache

If you’ve successfully completed the two steps above, you should be able to write your code and successfully compile your project.  Once you generate your WSP file, you can then deploy it like any other WSP.

Please Use Caution

If you do development for both 2007 and 2010, you can do this for both on the same workstation; just be sure to complete both steps for each version.  Since the 2007 and 2010 assemblies have different Assembly Versions (12.0.0.0 and 14.0.0.0), you don’t have to worry about conflicts in the GAC.  Be sure to use caution, however, because in my experience, Visual Studio tends to grab the SharePoint 2010 version of the DLL even for a SharePoint 2007 project if they’re both registered on your workstation.  If this happens, remove the incorrect reference, and add a reference to the correct 2007 DLL from your 12\ISAPI directory.


Posted

in

, ,

by

Comments

16 responses to “How to Perform SharePoint Development On A Client Workstation”

  1. fahad Avatar
    fahad

    I configured above mentioned DLLS in client machine but stilll getting the same error that sharepoint not installed in your machine.

    1. Bryant Sombke Avatar

      Which version of Visual Studio are you working with? Visual Studio 2010 won’t let you create a SharePoint 2010 project using this “hack,” but it will let you open and modify an existing solution. I’ve had no problems creating new projects this way with Visual Studio 2008 and WSP Builder. A lot of that likely has to do with Visual Studio 2010’s enhanced integration with SharePoint 2010.

  2. Bhuvana Aug13 Avatar
    Bhuvana Aug13

    I have installed windows server 2008 R2,Sharepoint server 2010,Sharepoint Designer in Server system…
    Now i have installed visual studio 2008 SP1 in client system (Windows vista)…
    My Question is how get the sharepoint server from server system to client side…

  3. Bhuvi Avatar
    Bhuvi

    I can’t able to perform 2nd step,throwing an error.

    1. Bryant Sombke Avatar

      Hmmm, are you logged into your machine as an Administrator? I know with recent versions of Windows, User Account Control makes this step more difficult.

      I am able to drag assemblies into the GAC on my laptop, but I’ve heard of other people having difficulty with this as well. I’d suggest checking your UAC settings and that your account is a Local Administrator on your machine.

  4. Knute Snortum Avatar
    Knute Snortum

    You can’t develop solutions on a machine that doesn’t have SharePoint installed.  Copying dlls won’t help.

    http://msdn.microsoft.com/en-us/library/ee554869.aspx 

    1. Bryant Sombke Avatar

      That’s not true; I do it all the time. With SharePoint 2010, however, you cannot start a new Solution on a machine without SharePoint installed. But you certainly can modify an existing solution on a machine without SharePoint installed.

      Remember, just because something’s in the MSDN documentation doesn’t mean it’s true.

  5. Knute Snortum Avatar
    Knute Snortum

    You can’t develop solutions on a machine that doesn’t have SharePoint installed.  Copying dlls won’t help.

    http://msdn.microsoft.com/en-us/library/ee554869.aspx 

  6. adilahmed Avatar
    adilahmed

    I can not able to register or add dlss as mentioned in second step even i have full control for administrator user . iam using windows xp for client workstation

  7. Cedric Avatar
    Cedric

    This may seem like a dumb question but can you deploy a sandbox solution to the server from the client machine once this hack is completed?

    1. Bryant Sombke Avatar

      As far as I know, you can’t deploy the sandboxed solution through Visual Studio with this method. However, you can right-click on the project and choose “Package,” and then manually upload the WSP file to the Site Collection’s solution gallery.

  8. Tor K. Haugen Avatar
    Tor K. Haugen

    Thanks, you solved my problem.

    Just to note a small typo: In the section “Copy the SharePoint DLLs” you give the same path for SharePoint 2007 and SharePoint 2010. For SharePoint 2010 it should be …14ISAPI.

    1. Bryant Sombke Avatar

      Thank you, the typo has been corrected. I’m glad this article was helpful to you.

  9. ActonSantiago Avatar

    I can not able to sign-up or add dlss as described in second step even i have full control for manager customer . iam using ms windows xp for customer workstation.

  10. Moses Mann Avatar

    There is an easy workaround that can allow a SharePoint developer to be
    productive, even while using their laptop on the road without an available internet connection.

  11. Rudyard Frazier Avatar

    The most well-known way to set up a SharePoint growth atmosphere is to run both Visual Studio and SharePoint on the same hosting server example.

Leave a Reply