App Development



Developing SharePoint 2013 apps

Set up an on-premises development environment for SharePoint  October 29, 2021 – 11:40 pm
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012

Learn how to set up a development environment that is specifically suited to developing SharePoint Add-ins with an on-premises installation of SharePoint.

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

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 installation and configuration, Hardware and software requirements for SharePoint, 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:

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.

Install the prerequisites for the operating system and SharePoint

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.

Figure 1. 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'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.

Figure 2. Choose the site template page

Configure services in SharePoint for server-to-server add-in use

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:

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.

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.

Configure an isolated add-in domain in SharePoint

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.

Perform the steps in the following procedure to create an isolated add-in domain.

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.

net start spadminv4 net start sptimerv4

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.)

Source: dev.office.com

Related posts:

  1. develop Android apps on windows 7
  2. Developing Android apps on windows
  3. Develop apps for iphone on windows
  4. Developing Augmented Reality apps
  5. App development in SharePoint 2013