How To Add A SharePoint Add-In 2013

Adding a SharePoint Add-in in SharePoint 2013 requires setting up your development environment and creating the add-in project. The process involves installing Visual Studio and the Microsoft Office Developer Tools, as well as signing up for an Office 365 developer subscription.

Once your development environment is set up, you can begin creating the add-in project. There are two types of add-ins you can choose from: SharePoint-hosted and provider-hosted. SharePoint-hosted add-ins contain SharePoint lists, web parts, workflows, and other components, while provider-hosted add-ins can include custom functionality and external resources.

To create a SharePoint-hosted add-in in Visual Studio, follow these steps:

  1. Set up your development environment by installing Visual Studio and the Microsoft Office Developer Tools. You can also sign up for an Office 365 developer subscription.
  2. Open your developer site in a browser and make note of the site’s URL.
  3. Start Visual Studio, select File > New > New Project, and choose Add-in for SharePoint under the Office/SharePoint node.
  4. Name your project and provide the URL of the SharePoint site where you want to debug the add-in. Select SharePoint-hosted as the hosting option.
  5. Open the AppManifest.xml file and make any necessary changes to the add-in’s properties.
  6. Create SharePoint components like lists, workflows, and pages in the project.
  7. Code the functionality of your add-in using JavaScript.
  8. Deploy the add-in to your SharePoint site by selecting Publish in Visual Studio.
  9. Install the add-in on your SharePoint site by navigating to the Site Contents page and selecting “Add an Add-in”.

This process allows you to create and deploy a SharePoint Add-in in SharePoint 2013 using Visual Studio. By following these steps, you can enhance the capabilities of your SharePoint site and customize it according to your specific requirements.

Setting up the Development Environment

Before you can start creating your SharePoint Add-in, you need to set up your development environment. This involves installing Visual Studio and the Microsoft Office Developer Tools. Additionally, signing up for an Office 365 developer subscription will provide you with the necessary resources and access to create and test your add-in.

Installing Visual Studio and Microsoft Office Developer Tools

To begin, download and install Visual Studio, the integrated development environment (IDE) for creating SharePoint Add-ins. Ensure that you select the appropriate version compatible with your system. Once installed, you can proceed to add the Microsoft Office Developer Tools to your Visual Studio installation. These tools provide additional templates and functionality specifically for Office and SharePoint development.

Sign up for an Office 365 Developer Subscription

An Office 365 developer subscription allows you to create and test SharePoint Add-ins in a dedicated environment. To sign up for a subscription, visit the Office 365 Developer Program website and follow the registration process. Once you have access, you can create a developer site where you can deploy and debug your add-ins without affecting any production environments.

By setting up your development environment with Visual Studio, the Microsoft Office Developer Tools, and an Office 365 developer subscription, you will have all the necessary resources to create and test your SharePoint Add-in in SharePoint 2013.

Creating the Add-in Project

Once your development environment is set up, you can proceed to create the add-in project for your SharePoint Add-in in SharePoint 2013. The add-in can be either SharePoint-hosted or provider-hosted, depending on your requirements.

SharePoint-hosted add-ins are self-contained and only contain JavaScript code on custom SharePoint pages. They can include components like SharePoint lists, web parts, workflows, and pages. To create a SharePoint-hosted add-in in Visual Studio, follow these steps:

  1. Open Visual Studio and select “File > New > New Project” from the menu.
  2. Choose “Add-in for SharePoint” under the Office/SharePoint node.
  3. Name your project and provide the URL of the SharePoint site where you want to debug the add-in.
  4. Select “SharePoint-hosted” as the hosting option.
  5. Open the AppManifest.xml file and make any necessary changes to the add-in’s properties.
  6. Create SharePoint components like lists, workflows, and pages in the project.
  7. Code the functionality of your add-in using JavaScript.
  8. Deploy the add-in to your SharePoint site by selecting “Publish” in Visual Studio.
  9. Install the add-in on your SharePoint site by navigating to the Site Contents page and selecting “add an add-in”.

This process allows you to create and deploy a SharePoint Add-in in SharePoint 2013 using Visual Studio. SharePoint-hosted add-ins provide a flexible and customizable solution for extending the functionality of SharePoint sites.

Provider-hosted add-ins

Alternatively, if you require more complex functionality or integration with external systems, you can choose to create a provider-hosted add-in. This type of add-in can be hosted on any web server and can use any programming language or technology stack.

To create a provider-hosted add-in, follow the same steps as above but select “Provider-hosted” as the hosting option. You will need to configure your web server to host your add-in and handle the communication between SharePoint and your provider-hosted solution.

Summary

In summary, creating a SharePoint Add-in in SharePoint 2013 involves setting up your development environment, creating the add-in project, and deploying it to your SharePoint site. SharePoint-hosted add-ins are ideal for adding custom components and functionality to SharePoint sites, while provider-hosted add-ins offer more flexibility and integration options.

Add-in Type Key Features
SharePoint-hosted JavaScript code on custom SharePoint pages, SharePoint lists, web parts, workflows, and pages
Provider-hosted Hosted on any web server, can use any programming language or technology stack

Deploying and Installing the Add-in

Once your SharePoint Add-in project is ready, you can deploy and install it on your SharePoint site using the following steps:

Step 1: Make Changes to the AppManifest.xml File

Open the AppManifest.xml file in your project and make any necessary changes to the add-in’s properties. This includes specifying the add-in’s title, description, icon, and other relevant information. The AppManifest.xml file serves as a configuration file for your add-in and allows SharePoint to understand and display your add-in correctly.

Step 2: Debugging and Testing with Visual Studio

Before publishing your add-in, it’s important to debug and test it to ensure it functions as expected. Visual Studio provides a powerful debugging environment for SharePoint Add-ins. Simply hit F5 to start debugging your add-in on the SharePoint site you specified during project creation. Use breakpoints and step-through debugging to troubleshoot any issues and validate the functionality of your add-in.

Step 3: Publishing the Add-in

Once you are satisfied with the testing and debugging phase, it’s time to publish your add-in. In Visual Studio, select “Publish” from the Build menu. This will package your add-in and generate an installation file (.app) that can be deployed to SharePoint.

Step 4: Installing the Add-in on SharePoint

To install the add-in on your SharePoint site, navigate to the Site Contents page. Click on “Add an Add-in” and choose “From Your Organization” or “From the SharePoint Store” depending on where you published the add-in. Find your add-in in the list and click “Trust It” to install it on your SharePoint site. Once installed, you can access and use your SharePoint Add-in from the site’s navigation or other designated areas.

By following these steps, you can successfully deploy and install your SharePoint Add-in on SharePoint 2013. Remember to thoroughly test and validate your add-in before making it available to users, ensuring a seamless user experience and enhanced productivity within your SharePoint environment.

Meet the Author

Abdul Rahim has been working in Information Technology for over two decades. Learn how Abdul got his start as a Tech Blogger , and why he decided to start this Software blog. If you want to send Abdul a quick message, then visit his contact page here.