Setting up a Development Environment with Sharepoint 2010 Server on Windows 7

Ramping up on Sharepoint isn't a simple task. But one thing that everyone will most likely have to face is to prepare our own development environment. So here's a quick break down how I set up mine.

First thing first: Hardware and OS

Make sure you have a decent 64 bit machine (most new laptop is 64bit capable) with Windows 7 64 bit and at least 8 gigs of RAM. It'll run with less, but need a lot of patience. I will definitely don't recommend having less ram than that.

I assume you probably already have .Net 3.5 (or 4), VS2010 and the rest.

Install WCF Hotfix

So looks like someone has screwed up in the WCF team. Microsoft however have released a hotfix and make sure you install this first otherwise you will get "Unrecognized attribute 'allowInsecureTransport' error in ULS log. Please note the 2008 R2 fix also applies to Windows 7.

Get it here: Windows Server 2008 R2

Installing Sharepoint on Windows 7

Follow the guide here: Setting Up the Development Environment for SharePoint 2010 on Windows Vista, Windows 7, and Windows Server 2008. It gives you all the list of modification that you need to make to the config file so that you can install it on a Windows 7 machine.

However don't go through the wizard to configure Sharepoint. It'll force you to use a domain account. You may want to use local accounts instead for simplicity.

Use Local accounts

How to set up a local account : here's what you have to do: Single Server Complete Install of SharePoint 2010 using local accounts.

Activating My Sites

If you're dealing with My Sites, here's a link on how to activate it. Sharepoint 2010: Activating My Sites.

Enabling ULS Logging

Sharepoint doesn't normally spits out helpful error message for us developers, so you want to turn on logging.

  1. Go to Central Admin > Reporting > Diagnostic Logging
  2. Select All Categories
  3. Least critical event to report : error
    Least critical event to trace : Unexpected
  4. Press OK

Logs are accessible under the 14 Folder\LOGS (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS)

There's a few ULS log viewer out there, but nothing I'm happy about. So I'm just using BareTailPro like I would with other log files.

Enabling Developer Dashboard

Open up Sharepoint 2010 Management Shell and type the following:

stsadm -o setproperty -pn developer-dashboard -pv ondemand

This will show a dashboard icon on the top right hand side. Clicking on the icon will show tracing information.

Read more

When you're not developing Sharepoint

Sharepoint is a server product, so it's not surprising that it eats up a lot of memory. So if you're like me who don't do Sharepoint dev day in day out, you want to be able to toggle the services on and off. I'm relying on Sharepoint 2010 Service Manager to do this.

image

If you can't start a service go to Windows' Services and make sure the startup type of the service is at least set to manual.

Oh also don't forget on clicking on ’˜Stop SharePoint 2010 from starting automatically when Windows Start'. This will :as it says-configure the services so that Sharepoint doesn't start automatically, which will increase boot up time tremendously.

Did I miss anything ?