Microsoft link - https://msdn.microsoft.com/en-us/library/fp179923(v=office.15)
Set up an on-premises development environment for SharePoint Add-ins
SharePoint Add-ins
Learn how to set up a development environment that is specifically suited to developing SharePoint Add-ins with an on-premises installation of SharePoint.
Last modified: September 02, 2015
Applies to: apps for SharePoint | Office 365 | SharePoint Add-ins | SharePoint Foundation 2013 | SharePoint Server 2013
In this article
Install the operating system for your development environment for SharePoint Add-ins
Install the prerequisites for the operating system and SharePoint
Configure services in SharePoint for server-to-server add-in use
Install Visual Studio and Office Developer Tools for Visual Studio
Configure an isolated add-in domain in SharePoint
Additional resources
Applies to: apps for SharePoint | Office 365 | SharePoint Add-ins | SharePoint Foundation 2013 | SharePoint Server 2013
Note |
---|
The name "apps for SharePoint" is changing to "SharePoint Add-ins". During the transition, the documentation and the UI of some SharePoint products and Visual Studio tools might still use the term "apps for SharePoint". For details, see New name for apps for Office and SharePoint. |
Install the operating system for your development environment for SharePoint Add-ins
Install the prerequisites for the operating system and SharePoint
Configure services in SharePoint for server-to-server add-in use
Install Visual Studio and Office Developer Tools for Visual Studio
Configure an isolated add-in domain in SharePoint
Additional resources
The requirements for a development environment are less stringent and costly than the requirements for a production environment, and the guidelines described here do not support a production environment installation. See Overview of SharePoint 2013 installation and configuration, Hardware and software requirements for SharePoint 2013, and Configure an environment for SharePoint Add-ins for the instructions to set up a production environment installation of SharePoint.
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 from the following options:
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 from the following options:
- Install SharePoint on Windows Server 2008 R2 Service Pack 1 x64 or Windows Server 2012.
- 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 2013 virtual machines and Hyper-V environment for guidance on setting up a Microsoft Hyper-V virtual machine for SharePoint.
Note |
---|
Installation of SharePoint is supported only on Windows Server 2008 R2 Service Pack 1 x64 or Windows Server 2012. If you want to develop SharePoint Add-ins for SharePoint on Windows 7 or Windows 8, you can sign up for an Office 365 Developer Site and develop add-ins remotely. |
- Run the PrerequisiteInstaller.exe tool that is included with your installation files.
- Run the Setup.exe tool that is included with your installation files.
- Accept the Microsoft Software License Terms.
- On the Choose the installation you want page, choose Stand-alone.
- 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.
- After the installation is complete, you’re prompted to start the SharePoint Products and Technologies Configuration Wizard.
Note The SharePoint Products and Technologies Configuration Wizard may fail if you’re using a computer that is joined to a domain but that is not connected to a domain controller. If you see this failure, 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. On this page, choose the Developer Site template. You can only deploy SharePoint Add-ins from Visual Studio to a Developer Site.
In this step, you configure services in SharePoint for server-to-server add-in use. These steps ensure that you will be able to create high trust provider-hosted add-ins with your installation. See Create high-trust SharePoint Add-ins for more information about creating this kind of add-in.
- Ensure that the App Management Service and user profile application are configured. (It is called "App Management Service" because SharePoint Add-ins were originally named "apps for SharePoint".) The steps are as follows:
- In Central Administration, under Application Management, select Manage service applications.
- On the Service Applications page, ensure that the following services are started:
- User Profile Service Application
- App Management Service
- Under Application Management, select Manage services on server.
- On the Services on Server page, ensure that the following services are started:
- User Profile Service
- Ensure that at least one profile is created in the User Profile Service Application. The steps are as follows:
- In Central Administration, under Application Management, select Manage service applications.
- Next, select User Profile Service Application.
- On the Manage Profile Service: User Profile Service Application page, under People, select Manage User Profiles.
- On the Manage User Profiles page, select New Profiles.
- On the Add User Profile page, type your account name and email address.
- Select Save and Close.
Note If you get a message saying that the profile you are trying to create already exists, select Cancel and Go Back. - Back on the Manage User Profiles page, you should see Total number of profiles: 1.
- If you don't already have Visual Studio 2013 or later installed, install it with the instructions at Install Visual Studio. We recommend using the latest version from the Microsoft Download Center.
- Visual Studio includes the Microsoft Office Developer Tools for Visual Studio, but sometimes a version of the tools is released between updates of Visual Studio. To be sure that you have the latest version of the tools use run the installer for Office Developer Tools for Visual Studio 2013, or installer for Office Developer Tools for Visual Studio 2015.
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.
Please read Host webs, add-in webs, and the isolated domain before you carry out any procedures in this section.
You must create an isolated domain in your test SharePoint farm. Also, your SharePoint installation needs a general wildcard host header domain where it can provision SharePoint-hosted add-ins.
For development purposes, you can modify your hosts file as you need to route your development computer to a test instance of a SharePoint Add-in. Visual Studio modifies your hosts file automatically when you build and deploy the add-in.
Perform the steps in the following procedure to create an isolated add-in domain.
Carry out the following procedure only if your environment uses a proxy server. After you create your isolated add-in domain, perform the steps in the following procedure to add that domain to your bypass list in Internet Explorer. This ensures that you can navigate to this domain after you deploy a SharePoint-hosted add-in or a provider-hosted add-in that includes an add-in web.
See Deploying and installing SharePoint Add-ins: methods and options for information about your options for deploying your add-ins.
You must create an isolated domain in your test SharePoint farm. Also, your SharePoint installation needs a general wildcard host header domain where it can provision SharePoint-hosted add-ins.
For development purposes, you can modify your hosts file as you need to route your development computer to a test instance of a SharePoint Add-in. Visual Studio modifies your hosts file automatically when you build and deploy the add-in.
Note |
---|
For production farms, you would have to create a DNS routing strategy within your intranet and optionally configure your firewall. See Install and Manage SharePoint Add-ins for more information about how to create and configure a production environment for SharePoint Add-ins. |
Note |
---|
You must perform all of the steps in the following procedure while logged in as the farm administrator, and you must run the command prompt and the SharePoint Management Shell as an administrator. |
Create an isolated add-in domain on your development computer
- Ensure that the spadmin and sptimer services are running by opening a command prompt and typing the following commands.
- Create your isolated add-in domain by running the SharePoint Management Shell as an administrator and typing the following command. Replace the contosoaddins.com with your add-in domain. It should not be a subdomain of the host SharePoint domain. Doing so largely defeats the security advantages of having isolated add-in domains. For example, if the host domain is contoso.com, do not use addins.contoso.com as the add-in domain.
Set-SPAppDomain "contosoaddins.com"
- Ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running by typing the following command in the SharePoint Management Shell.
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance
- Verify that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running by typing the following command in the SharePoint Management Shell. The output will indicate whether each service is online.
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"}
- You must specify an account under which the SPSubscriptionService and AppManagementServiceInstance service instances will run. This account must be an SPManagedAccount. You can create an SPManagedAccount by typing the following command in the SharePoint Management Shell. (You’ll be prompted for the account domain\user and password.)
$account = New-SPManagedAccount
- Specify an account, application pool, and database settings for the SPSubscriptionService and AppManagementServiceInstance services by typing the following code in the SharePoint Management Shell. If you created a SPManagedAccount in the preceding step, use that account name here.
$account = Get-SPManagedAccount "domain\user" $appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account $appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account $appSubSvc = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseName SettingsServiceDB $proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc $appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB $proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
- Specify your add-in prefix (see Host webs, add-in webs, and the isolated domain) by typing the following code in the SharePoint Management Shell.
Set-SPAppSiteSubscriptionName -Name "add-in" -Confirm:$false
Add your isolated add-in domain to your bypass list in Internet Explorer
- In Internet Explorer, go to Tools.
- Choose Internet options.
- On the Connections tab, choose the LAN Settings button.
- Clear the Automatically detect settings check box.
- Select the Use a proxy server for your LAN check box.
- Choose the Advanced button, and then add *.YourAddinsDomain.com to the Exceptions list.
- Choose the OK button.
- Choose the OK button to close the Local Area Network (LAN) Settings dialog box.
- Choose the OK button to close the Internet Options dialog box.
Tip |
---|
After you deploy a SharePoint-hosted add-in to your installation, you may be prompted to log in with your credentials when you try to launch it. You will need to disable the loopback check to get rid of these prompts. See You receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or a later version for instructions on how to disable the loopback check. |
Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. cool companies names
ReplyDelete