I’ve got my SharePoint development environment setup, now what?

There are a bunch of posts out there on how to get your SharePoint development environment up and running.  A quick search on “Setting up your SharePoint development environment” will yield plenty of results to skim through to fit your needs.  However, not many of these articles focus on tips and tricks to make day to day development in SharePoint easier.  I’ve compiled some useful tips over the past few years that I wanted to share.

Software

SP Dispose Check – This is a tool release by Microsoft to check for un-disposed SPSite and SPWeb objects.  You should run this on a regular basis, and always before deployment to production.

SharePoint Designer – A lot of people overlook SharePoint designer claiming it’s not for “real developers”, but it can be invaluable for quickly manipulating existing SharePoint sites.  Real developers know how to use the tools available to them, and this is just another tool.

Red Gate .NET Reflector – This is great for digging into SharePoint assemblies when you want to get intimate with how something works.

U2U Caml Query Builder – If you are developing for SharePoint you need this, no exceptions.  It will make writing CAML queries much, much easier

Fiddler – Great tool for HTTP Request/Response debugging.  This comes in handy when debugging AJAX web service calls.  Firebug also works good here.

Firefox and Firebug – Firebug is an extremely useful tool for HTML, CSS and Javascript.  If you are doing SharePoint development you are inherently going to be working with these things a lot, hands down Firebug is the best tool for this.

IE Developer Toolbar – When you need to troubleshoot rendering issues in IE, this tool comes in handy.  IE8 has these built in, but anything before that you will need to download the add on.

WSPBuilder – Absolutely invaluable tool for building solution packages, otherwise known as .wsp’s.

OS Modifications

Environment Variables

First thing you should do is add stsadm to your “Path” variable.  This will allow you to execute stsadm from anywhere in your command prompt.  You can do this by adding the following to your “Path” variable in environment variables.  Don’t delete what is already there, just add to the end.

c:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN;

I would also add SPDispose check if you installed above (I highly recommend it).

C:\Program Files\Microsoft\SharePoint Dispose Check\;

I also like to add my bin directory as a new variable to make copying assemblies easier, this works well for team development when not everyone has the same VM as you can all use the same post build steps.

image

If you are looking to squeeze every bit of performance out of your VM you can stop the following services:

Windows SharePoint Timer Service – this runs scheduled jobs for SharePoint.  If you shut this off some things may not function as you would expect.  For example, you need to manually execute .wsp deployments.  You can manually run the timer service by calling stsadm –o execadmsvcjobs.  This can consume quite a bit of resources, I have always developed with mine off, but be warned, you should understand what this does.

Windows SharePoint Services Search – If you don’t need search and aren’t developing any components using search on your VM you can turn this service off.

Office SharePoint Server Search – Same as above.

Quick Access

In my quick launch bar I like to add:

A shortcut to the 12 hive and virtual directory root

  • "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12"
  • C:\inetpub\wwwroot\wss\VirtualDirectories\80

A shortcut to recycle the app pool

  • Windows 2008
    %windir%\System32\inetsrv\appcmd.exe recycle apppool "SharePoint - 80"
  • Windows 2003
    cscript %windir%\system32\iisapp.vbs /a "SharePointDefaultAppPool" /r

Visual Studio

Add Guid Generator to Tools menu – this used to be there by default, not sure why they removed it, but you really need it for SharePoint development

Tools / External Tools / Add - c:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\guidgen.exe

That’s all I can think of for now.  What tools do you like to use?  What did I miss and more importantly what am I missing out on?