Office 365 Development With Visual Studio 2017

Microsoft launched Visual Studio 2017 earlier in March this year, which is the latest IDE to develop apps and Websites and mostly anything on the Microsoft platform. I had written a complete article on how to do installation of VS2017 here and an article about its new features here. If you are new to VS2017 and haven’t tried it yet, then I suggest you  read both of my articles too.

In this article, I will write about Office 365 development with Visual Studio 2017. For brevity, I will not touch VS2017 installation in much detail, which I did in my other article. The core of this article is Office 365 development and how you can utilize powerful tools in VS2017 for all the types of Office development.

This article is a part of multiple articles series, which I plan to write on Office 365 development. Some more articles will be published here in the future.

Following are the objectives of this article,

  • How to get started with Visual Studio 2017.
  • Office 365 options while installing VS2017.
  • Introduction to Office 365 tools in VS2017.

Thus, let’s start with the installation of Visual Studio 2017.

To download VS2017, go to the Website under Download Visual Studio link, choose Professional 2017, as shown below.

Visual Studio
Image source: Microsoft

Once you click on the link “Professional 2017”, it will ask you to save the installer file, click “Save”, as shown below.

Visual Studio

You will be shown a confirmation dialog. Click Yes, as shown below.

Visual Studio

Once again, the installer will ask for your confirmation. Click Continue, as shown below.

Visual Studio

Allow the installer some time to configure. After a minute or so, it will show you the screen given below, which is the new improved modularized Visual Studio 2017 installer screen.

Visual Studio

Our focus here is the Office development section, so scroll down and you will notice a checkbox area named Office/SharePoint development. Select the checkbox and you will be shown the description on right side, as shown below.

Visual Studio

This will install Office Developer Tools for Visual Studio as a default choice.

Remember that Visual Studio Tools for Office (VSTO) is optional, so don’t forget to select the checkbox for it (in Summary section on right side of Installation Window), as shown below.

Visual Studio

Alternatively, the same options can be found in Individual Components tab of Installation Window under Development activities section, as shown below.

Visual Studio

Click Install on bottom right side to continue the installation. The installer will show the progress of the installation as and when its being made.

Relax and have a cup of coffee and let the installer do the work.

Let’s also see what is the difference between Visual Studio Tools for Office (VSTO) and Office Developer Tools for Visual Studio.

Visual Studio Tools for Office (VSTO)

It was launched earlier as bridge between Office and the Studio (as claimed by Microsoft) around the start of the year 2004, targeting Office 2003 development at that time.

Visual Studio

image credit: internet source

Originally, it was launched as a replacement for VBA (Visual Basic for Applications) for working with Excel and Word, but later numerous advances and enhancements were added to it in the later versions. VSTO provides developers the tools to build on top of Office as a platform, using which you can develop add-ins for Word, Excel etc. in C#/VB.NET.

Office Developer Tools for Visual Studio

These tools were launched to provide Microsoft developers; the latest Office development features in Visual Studio. You can use Office developer tools for the following.

  • Create Office add-ins (these add-ins have a small footprint compared to VSTO add-ins).
  • Integrate Office 365 APIs into your projects.
  • Create SharePoint add-ins.

Back to VS2017 now

Check Visual Studio installer now. It may have finished the installation, which you can know from its success message. If the installation is done, you can directly open VS2017 from the installer Window or go to run prompt and type Visual Studio 2017.

Once VS2017 opens, click Create new project link to create a new project.

Visual Studio

Once the New Project Window opens inside VS2017, click Office/SharePoint node, as shown below.

Visual Studio

It gives you 3 types of new project templates, as described below.

  • If you click on Add-ins link, you will be shown the options given below.

    Visual Studio

You can create Word, Excel, Outlook, PowerPoint and SharePoint add-ins with this selection.

  • If you click VSTO Add-ins link, you will be shown the options given below

    Visual Studio

In addition to Word, Excel, Outlook, PowerPoint add-ins, with VSTO; you can also create add-ins for Visio, Project and InfoPath. Please note that SharePoint add-ins cannot be created, using VSTO.

  • If you click SharePoint Solutions link, you will be shown the options given below.

    Visual Studio

You can create different types of SharePoint solutions for SP2016 and SP2013.

For the scope of this article, I covered till New Project Window in VS2017 only. What happens when you create new projects of any of these types as well as how to do the actual coding for Office development will be covered in my future posts.

Happy learning.