SharePoint 2010: Setup a Development Environment

This topic is a how to.
Please keep it as clear and simple as possible. Avoid speculative discussions as well as a deep dive into underlying mechanisms or related technologies.

Introduction

When we create or customize SharePoint 2010 solutions, it is usually best to develop the solution on a local computer where Microsoft SharePoint Server 2010 or Microsoft SharePoint Foundation 2010 is installed: this article describes how to install a development environment with Microsoft SharePoint 2010 and Microsoft Visual Studio 2010.
The development environment that we create by using these instructions will not support SharePoint 2010 farm installations and we should not host active production sites with this configuration. These instructions enable us to get started with an environment that is specifically suited to developing SharePoint custom solutions.

Return to top

Step 1: Choose and Preconfigure the Operating System

The requirements for a development environment are less stringent and costly than the requirements for a production environment; the guidelines provided are not intended to support a production environment installation.
Regardless of the operating system, we choose to set up our development environment, we must use a computer with an x64-capable CPU and the following amounts of RAM:

  • at least 2 gigabytes (GB) of RAM to install and run SharePoint 2010 Foundation; 4 GB of RAM is preferable;
  • at least 4 gigabytes (GB) of RAM to install and run SharePoint 2010 Server; 6 GB to 8 GB of RAM is preferable.

Now we can choose between the following options:

  • install SharePoint 2010 on Windows Server 2008 Service Pack 2 x64 (or Windows Server 2008 R2 x64).
  • use Microsoft Hyper-V and install SharePoint 2010 on a virtual machine running a Windows Server 2008 Service Pack 2 x64 (or Windows Server 2008 R2 x64) guest operating system;
  • install SharePoint 2010 on Windows 7 x64, Windows Vista Service Pack 1 x64, or Windows Vista Service Pack 2 x64;
  • use Microsoft Hyper-V and install SharePoint 2010 on a virtual machine running a Windows 7 x64, Windows Vista Service Pack 1 x64, or Windows Vista Service Pack 2 x64 guest operating system.

We have to install the WCF Hotfix for Microsoft Windows: this hotfix is available for Windows Server 2008 Service Pack 2, Windows Vista Service Pack 1 and Windows Vista Service Pack 2 and for Windows Server 2008 R2 and Windows 7. This hotfix is not needed when .NET Framework 4 is installed on Windows Server 2008 R2 Service Pack 1 or Windows 7 Service Pack 1.

If we are using Windows Vista Service Pack 1 or Windows Vista Service Pack 2, install the hotfix for ASP.NET on IIS 7.0 (KB967535): this hotfix (which is already installed on Windows 7, Windows Server 2008 Service Pack 2 and Windows Server 2008 R2) updates the ASP.NET common language runtime (CLR) to recognize a new option of optimizing compilations. To take advantage of this option, set the optimizeCompilations property of the <compilation> tag in our web.config file to true as in the following

<compilation optimizeCompilations="true">

We must install the ADO.NET Data Services Update for .NET Framework 3.5 SP1 to enable REST-based data services: this update is available for Windows Server 2008 Service Pack 2, Windows Vista Service Pack 1 and Windows Vista Service Pack 2 and for Windows Server 2008 R2 and Windows 7. This hotfix is not needed when .NET Framework 4 is installed on Windows Server 2008 R2 Service Pack 1 or Windows 7 Service Pack 1.

Windows 7 and Windows Vista cannot be used for production deployments of SharePoint 2010. If we use Windows 7 or Windows Vista for our development environment, we should have access to a test environment that has the same operating system installed as our production environment. Windows 7 and Windows Vista are recommended only for developer workstations and should be used only for stand-alone installations. We can use a separate Microsoft SQL Server instance, but we should not configure our installation as a SharePoint 2010 farm and we should not host active sites on this configuration.

Return to top

Step 2: Install the Prerequisites for SharePoint 2010

SharePoint 2010 requires our operating system to have certain prerequisites installed before installing: for this reason, SharePoint 2010 includes a PrerequisiteInstaller.exe tool that installs all of these prerequisites for us. If our developer workstation is set up with the Windows Server 2008 Service Pack 2 or Windows Server 2008 R2 operating system, we can install SharePoint 2010 by running the PrerequisiteInstaller.exe tool (included with SharePoint 2010) to install the prerequisites that SharePoint 2010 needs and then run Setup.exe.

We cannot use PrerequisiteInstaller.exe on Windows 7 or Windows Vista: the default installation works only for Windows Server 2008, so we must edit one configuration file and install many of the prerequisites manually. We must perform each of the following steps while logged on with an account that has administrator access on the local computer.

To configure our development workstation we have to do the following

  1. Download SharePoint 2010 Foundation from the Microsoft Download Area, saving the file into a folder on the PC (for example, C:\SharePointFiles);

  2. Extract the installation files by opening a Command Prompt window, and then typing the following command

    SharePointFoundation.exe /extract:C:\SharePointFiles
    

    at the directory location of the folder where we copied the installation files in the previous step

  3. Run a text editor such as Notepad, open the installation configuration file located in C:\SharePointFiles\files\Setup\config.xml, add the following line

    <Setting Id="AllowWindowsClientInstall" Value="True"/>
    

    inside the <configuration> tag and save the file; this line will allow the execution of the installation program on a Windows client version.
    If we do not edit the configuration file as described in this step, the setup program will display an error message as showed in Figure 1.

    Figure 1: "Setup is unable to proceed" error message.

  4. Review the configuration file: remember that all of the text in this configuration file is case-sensitive.

  5. If we are using Windows Vista Service Pack 1 or Windows Vista Service Pack 2, we must install the following prerequisites:

    1. .NET Framework 3.5 SP1
    2. Windows PowerShell 2.0
    3. Windows Installer 4.5 Redistributable
  6. If we are using Windows Vista Service Pack 1, Windows Vista Service Pack 2 or Windows 7, install the following additional prerequisites:

    1. Microsoft Sync Framework
    2. SQL Server Native Client
    3. Windows Identity Foundation (Windows6.1-KB974405-x64.msu)
    4. Microsoft Chart Controls for the Microsoft .NET Framework 3.5 (Not needed when we are installing SharePoint Foundation 2010.)
  7. Manually enable each of the required Windows Features: copy (in a single line) and run the following command in a Command Prompt window

    start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;
    IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;
    IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;
    IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;
    IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;
    IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;
    IIS-CustomLogging;IIS-ManagementScriptingTools;IIS-Security;
    IIS-BasicAuthentication;IIS-WindowsAuthentication;
    IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;
    IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;
    IIS-WebServerManagementTools;IIS-ManagementConsole;
    IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;
    WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;
    WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation
    
  8. Verify that the required Windows Features are enabled: the command in the previous step enables all of the required features in the Internet Information Services section of the Windows Features dialog box, as we can see in Figure 2.  

    Figure 2: enabled Windows features list.

  9. Restart your computer.

Return to top

Step 3: Install SharePoint 2010

Open a Command Prompt window and then type the following at the command prompt

C:\SharePointFiles\Setup.exe

Accept the Microsoft Software License Terms; on the Choose the installation we want page, click "Standalone" to install everything on one developer workstation as in Figure 3.

Figure 3: choosing the installation type.

After the installation is complete, we are prompted to start the SharePoint Products and Technologies Configuration Wizard. If we are using a local instance of Microsoft SQL Server 2008, install the Microsoft SQL Server 2008 KB 970315 x64 before starting the wizard. If our development environment uses a remote instance of Microsoft SQL Server 2008 or if it has a pre-existing installation of Microsoft SQL Server 2008 on which KB 970315 x64 has already been applied, this step is not necessary. With the wizard open, do the following 

Alternatively, we can choose not to run the wizard by clearing the SharePoint Products and Technologies Configuration Wizard check box and closing the completed installation dialog box. Install SQL Server 2008 KB970315 x64, and then manually start the SharePoint Products and Technologies Configuration Wizard by opening a Command Prompt window and executing the following command

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\psconfigui.exe

After the configuration wizard is complete, we can see the new SharePoint site.

Return to top

Step 4: Install Visual Studio 2010 and Developer Documentation

If you don't have installed Visual Studio 2010 (not Express edition), this is the right moment to do that.
After installing Visual Studio, you have to download and install the Microsoft SharePoint 2010 SDK; do not forget to check for the availability of updates for the Visual Studio documentation.
Now you're ready to develop SharePoint 2010 applications.

Return to top


See Also

Other Languages

This article is also available in the following languages:

Italian (it-IT)