Start Developing SharePoint Now

Last week, I started a new job where my responsibilities include quite a bit of SharePoint development. Not that my last job didn’t, but I didn’t really have the time to focus on it, and I was the SharePoint guy. (If you dig back through my blog archives, you’re going to find a lot of posts where I wrestle with how to do certain things from a SharePoint perspective.)

SharePoint is a difficult beast when it comes to development. Getting started and actually doing something useful is difficult–Visual Studio doesn’t package solutions for you, there’s a ton of very different things you can extend, and high-level developer documentation is sparse (unless you buy a lot of books). You’d be surprised how much you learn when you have a specific objective, time to focus, the right references, and a properly configured development environment.

And if you want to try out SharePoint development, it’s surprisingly easy. After running Windows Server 2003 as my primary OS at my last job, I’ve decided never again. But I ran into this tip on one of the SharePoint videos on Channel 9 which makes it so much simpler.

  1. Install Virtual PC 2007 (download it here).
  2. Download and run the Windows SharePoint Services 3.0 SP1 Developer Evaluation VPC Image.
  3. This will create a virtual hard drive and the virtual machine settings to match. Open Virtual PC and add this as a new virtual machine.
  4. Install Virtual Machine Additions. You can do this through the “Action” menu on Virtual PC, which will mount a CD that will allow you to install this application.
  5. Go into the settings for your Virtual PC and share a folder on your computer.
  6. Download and install WSPBuilder on your virtual machine. This will automate building and deploying solutions and attaching the debugger to IIS worker processes, as well as give you templates to work from for common SharePoint development tasks.
  7. Set the main SharePoint site on the virtual machine to debug mode. Find its web.config file, and then make the following changes:
    • In the SharePoint section, find the SafeMode element. Make sure the CallStack attribute is set to “true.”
    • In the system.web section, find the customErrors element. Make sure the mode attribute is set to “off.”
    • In the system.web section, find the compilation element. Make sure the debug attribute is set to “true.”

The main caveat at this point is that I’m not sure about the licensing situation here. This VPC is an evaluation license, and includes Windows Server 2003, Office 2007, Visual Studio 2005, and SQL Server 2005. My company’s licensing agreement includes all of these, but your mileage may vary. Of course, this is for development; to actually use these applications in a production environment, you’ll have to have real licenses. At the very least, it’s an evaluation license, so it’s a good way to get your feet wet before you set up your own development environment.

And one major difficulty here: the virtual machine is time-bombed to expire on September 30, 2008. Which means you’ll have to set it up all over again, should Microsoft release another version of this virtual machine. (I have no reason to doubt they won’t; they have similar VPC images for IE6 and IE7 that are continually expiring and being re-released.) Of course, that’s part of the reason we set up the shared folder, so that we can migrate our code easily from the virtual machine to our computer.

Of course, doing any actual development (that is, not just poking through the SharePoint web interface) will require some reading material to get you started, but I’ll cover that in a later post.