Set up a general development environment for SharePoint
Learn the steps to set up a SharePoint development environment by installing SharePoint and Visual Studio.
How to determine the SharePoint development environment you need
First, decide what you want to build (to learn more about SharePoint Add-ins, see SharePoint Add-ins):
If you want to build farm solutions, we provide those steps in this article.
If you want to create SharePoint Add-ins, see Tools and environments for developing SharePoint Add-ins.
Create a SharePoint development environment on a Microsoft Azure virtual machine
If you have an MSDN subscription, you can quickly provision a virtual machine in Azure.
If you haven't activated the Microsoft Azure benefit that comes with your MSDN subscription, you can learn more about it at Microsoft Azure Benefit for MSDN Subscribers.
Note: The Microsoft Azure Image Gallery no longer provides images with SharePoint and Visual Studio preinstalled. But a Microsoft Azure VM is still a good option for a development machine. > Sign in to the Microsoft Azure management portal. > Create a VM using one of the images in the gallery for Windows Server 2008 R2 Service Pack 1 x64, Windows Server 2012 (or later). Follow the instructions provided by the virtual machine creation wizard. We recommend an X-Large VM size for SharePoint development.> After the machine is provisioned and running, complete the setup using the same procedures in the section below Create a SharePoint development environment on premises. (Skip the section about installing the operating system.)> Once you've set up your development environment, you can access your source control from Visual Studio on the virtual machine by using an Azure Point-to-Site connection. See Configure a point-to-site VPN connection to an Azure Virtual Network for instructions on how to do this.
Create a SharePoint development environment on premises
Install the operating system for your SharePoint Add-ins development environment
The requirements for a development environment for an installation of SharePoint are less stringent and costly than the requirements for a production environment. In any development environment, you should use a computer with an x64-capable CPU, and at least 16 GB of RAM to install and run SharePoint; 24 GB of RAM is preferable. Depending on your specific requirements and budget, you can choose one of the following options:
Install SharePoint on Windows Server 2008 R2 Service Pack 1 x64 or Windows Server 2012 (or later).
Use Microsoft Hyper-V and install SharePoint on a virtual machine running a Windows Server 2008 R2 Service Pack 1 x64 or Windows Server 2012 guest operating system. See Use best practice configurations for the SharePoint virtual machines and Hyper-V environment for guidance on setting up a Microsoft Hyper-V virtual machine for SharePoint.
Install the app development prerequisites for the operating system and SharePoint
SharePoint requires your operating system to have certain prerequisites installed before installation begins. For this reason, SharePoint includes a PrerequisiteInstaller.exe tool that installs all of the prerequisites for you. Run this tool before running the Setup.exe tool.
Run the PrerequisiteInstaller.exe tool.
Run the Setup.exe tool included with your installation files.
Accept the Microsoft Software License Terms.
On the Choose the installation you want page, choose Stand-alone.
Figure 2. Installation type choice
- If any errors occur in the installation, review the log file. To find the log file, open a Command Prompt window, and then type the following commands at the command prompt. A link to the log file also appears when the installation is complete.
cd %temp dir /od *.log
After the installation is complete, you are prompted to start the SharePoint Products and Technologies Configuration Wizard.
Note: The SharePoint Products and Technologies Configuration Wizard can fail if you are using a computer that is joined to a domain but that is not connected to a domain controller. If this failure occurs, connect to a domain controller either directly or through a Virtual Private Network (VPN) connection, or sign in with a local account that has administrative privileges on the computer.
- After the configuration wizard is complete, you see the Template Selection page of the new SharePoint site.
Figure 3. Choose site template page
Install Visual Studio
When you install Visual Studio, you get all of the templates, tools, and assemblies to develop SharePoint on your local development machine.
See Installing Visual Studio for instructions about installing Visual Studio.
Verbose logging in Visual Studio
Follow these steps if you want to turn on verbose logging:
Open the registry, and navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\ nn.n\SharePointTools, where nn.n is the version of Visual Studio, such as 12.0 or 14.0.
Add a DWORD key named EnableDiagnostics.
Give the key the value 1.
The registry path will change in future versions of Visual Studio.
If you will be creating workflows, continue with Set up and configure SharePoint Workflow Manager.