As there are different areas to target while creating SharePoint-hosted add-ins(formerly known as apps) such as setting up your development environment, creating an add-in and then packaging and Installing it, I have decided to create a series of 3 episodes.
Part 1 – Setting up development environment to create SharePoint-hosted add-ins
Part 3 – Package and install add-in to live site
Let’s cover Part 1 in this blog –
Setting up development environment to create SharePoint-hosted apps/add-ins
To create a SharePoint-hosted add-in, we need either Visual Studio 2013 or Visual Studio 2015 with any edition except express edition. To create add-in for SharePoint 2016, you need Visual Studio 2015. To add to that it is important to get the most recent version of Microsoft Office Developer Tools for Visual studio. Dont worry, steps below cover this in more details –
Step 1 – Download Visual Studio 2015
Just for personal development purposes, Visual Studio 2015 community edition would do which is free to download. You can get all the downloads from here – https://www.visualstudio.com/downloads/
Step 2 – Get Office 365 subscription
You can get Office 365 subscription from here – https://products.office.com/en-au/try. Here you can get 1-month free subscription. This link also has a live chat where you can consult with Microsoft consultant for more details about the different subscription options available. To begin with you can just start with the 1-month free subscription.
After you login to your Office 365 account, your Office 365 admin center would something look like this –
Step 3 – Create a Developer site/site collection in SharePoint online
For development and debugging, it’s a good idea to create a site to which you can create and deploy your work directly from Vsual studio. To create a developer site, simply create a site using ‘Developer site’ site template as shown below –
Step 4 – Download Microsoft Office developer tools for Visual studio
Download Office Developer Tools from here – https://www.visualstudio.com/vs/office-tools/ and install.
After installation, you will see “Office/SharePoint” tab while creating New Project.
Step 5 – Install Microsoft Exchange Webservices
If you don’t have “Microsoft Exchange Webservices” installed, you will get this visual studio error as shown below while creating SharePoint-hosted add-in in Visual Studio.
Download and install “Microsoft Exchange Webservices” from here – https://www.microsoft.com/en-au/download/details.aspx?id=35371.
If it still doesn’t work then use the following command using commandprompt –
Step 6 – Download SharePoint Server 2013 Client Components SDK
Download SharePoint Server 2013 Client Components SDK from here – https://www.microsoft.com/en-in/download/details.aspx?id=35585
Without this, you won’t be able to install/deploy your add-in to sharepoint online from Visual studio.