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.
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:
Now we can choose between the following options:
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.
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
SharePointFoundation.exe /extract:C:\SharePointFiles
<Setting Id="AllowWindowsClientInstall" Value="True"/>
Figure 1: "Setup is unable to proceed" error message.
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
Figure 2: enabled Windows features list.
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.
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.
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.
This article is also available in the following languages: