How to: Publish an app for Office that is packaged as an autohosted app for SharePoint [paved over]

Learn how to publish an app for Office that provisions the web application of the app in a Microsoft Azure web site that is associated with a SharePoint online account.

Last modified: April 07, 2014

Applies to: Access app for SharePoint | Excel 2013 | Excel 2013 RT | Excel 2013 SP1 | Excel Online | PowerPoint 2013 | PowerPoint 2013 RT | PowerPoint 2013 SP1 | PowerPoint Online | Project 2013 | Project 2013 SP1 | Word 2013 | Word 2013 RT | Word 2013 SP1

   Office.js: v1.0, v1.1

   Apps for Office manifests schema: v1.0, v1.1

To publish an app for Office by using this approach, you’ll need the following components.

  • Microsoft Visual Studio 2013

    -or-

    Visual Studio 2012 and the Microsoft Office Developer Tools for Visual Studio 2012. To download the Microsoft Office Developer Tools for Visual Studio 2012, see "Tools" on the Download page.

  • Microsoft Office 2013.

  • A SharePoint online account that provides access to Microsoft SharePoint 2013.

Note Note

You can only use this publishing model for task pane and content apps. You cannot use this approach to publish a mail app.

By enabling the app to provision its own web site, you do not have to deploy the web application to a separate server. The Azure web site infrastructure handles load balancing, multi-tenancy, and other important maintenance tasks for you.

With this publishing model, you can include multiple apps for Office in a single deployment package. If you want to publish updates, you can upload a single package to SharePoint. Administrators can use a single gesture in the SharePoint user interface to update all of the apps for Office associated with the package.

To test this out, you can use Visual Studio to create an app package. Even though your app is designed to appear in document as an App for Office, Visual Studio packages it as an app for SharePoint. You’ll install the app for SharePoint into the App for SharePoint catalog and then you will add the app to your site. This places your app for Office into the App for Office catalog and provisions the web site. Then, point to the App for Office catalog in the trust settings of an Office application, and then insert the app into a document.

When you are ready to distribute your app for production use, you can publish it as an app for SharePoint on the Office Store or have a SharePoint administrator add the package to the App for SharePoint catalog of an organization’s SharePoint server.

First, open or create a new app for Office project. Then, create a package that you can upload to SharePoint.

  1. In Solution Explorer, choose the app project.

  2. In the Properties window, in the Package Type list, choose the Autohosted app for SharePoint item.

    Figure 1. The Autohosted app for SharePoint item.

    The Autohosted app for SharePoint item.
  3. In Solution Explorer, open the shortcut menu for the app for Office project, and then choose Publish.

  4. If you are using Visual Studio 2013, the Publish your app page appears. Choose the Package the app link.

    If you are using Visual Studio 2012, the Publish Summary page appears. Choose the Finish button.

    The output folder appears. The folder contains a file that has an .app extension. In the next procedure, you’ll publish that file to a SharePoint site.

Add the package to the App for SharePoint catalog in SharePoint, and then add the app for SharePoint in that package to the site. This deploys your app for Office and provisions the Azure web site.

Note Note

This procedure is included for testing purposes. In a production environment, an admistrator of the SharePoint server would perform these steps.

  1. Open the App Catalog site of your SharePoint server. For more information about where to find this catalog, see Manage the App Catalog in SharePoint 2013.

  2. Upload the .app file that you generated in the previous procedure to the App Catalog site of your SharePoint server. For more information about how to do that, see Add apps to the App Catalog.

  3. After you have uploaded the .app file, to the side of the page, choose Site Contents.

    Figure 2. The Site Contents link in SharePoint.

    Site Contents
  4. In the Site Contents page, choose the add an app tile, and then, to the side of the page, choose the From Your Organization.

    Figure 3. The From Your Organization link in SharePoint.

    From Your Organization link in SharePoint.

    An app tile that matches the name of your app for SharePoint appears.

  5. Choose your app tile, and then choose the Trust it button.

In the list of installed apps, a tile appears for your app. If you choose the tile this help topic appears. The tile doesn’t perform any important actions in SharePoint. It is just a visual representation of your app. To use your app, you’ll insert it from inside a document.

To insert you app into a document, open the trust settings of the Office application (for example, Word or Excel), and point to the Apps for Office catalog in SharePoint. Then, you can insert the app into your document. The following procedure shows you how to do this.

Note Note

This procedure is included for testing purposes. In a production environment, an administrator would most likely establish trust between documents and app catalogs in SharePoint.

  1. Create or open an Excel workbook, Word document, PowerPoint presentation, or Project project.

  2. In Office application, select the File tab, choose Options, choose the Trust Center tab, choose the Trust Center Settings button, and then choose Trusted App Catalogs.

  3. In the Catalog Url field, provide the URL of the app catalog (for example, https://Contoso.sharepoint.com/site/appcatalog/), and choose the Add catalog button.

  4. In the Trusted Catalog Address list, next to the URL that you added, select the Show in Menu check box, and then choose the OK button.

  5. Close and restart the Office application.

  6. In the Office application, create a new document or open an existing document.

  7. On the Insert tab, choose Apps for Office, and then choose See All.

  8. In the Apps for Office dialog box, choose the MY ORGANIZATION link.

    Your app appears in the list.

  9. Select the app, and then choose the Insert button to add the app to your document.

To update an app, update the version of the app in Visual Studio. Then, package and publish the app again.

  1. Open the app for Office project in Visual Studio.

  2. In Solution Explorer, expand the app project folder, and then choose the <projectname>Manifest folder.

  3. On the menu bar, choose View, Open.

  4. In manifest editor, update the Version property to a new version number.

  5. In Visual Studio, package the app again. For more information, see the section Package the app for publishing earlier in this topic.

  6. In SharePoint publish the package. For more information, see the section Publish the package to the App for SharePoint catalog in SharePoint earlier in this topic.

    Note Note

    When you add the app package to the Apps for SharePoint catalog, make sure that the Add as a new version to existing files check box is selected in the Add a document dialog box.

  7. In SharePoint, return to the Site Contents page.

  8. Choose the tile for your app, choose the button, then choose the About button.

    Figure 4. The About button of an app tile.

    The About option for an app tile.
  9. A page appears that informs you that a new version of the app is available. Choose the Get It button.

Show:
© 2014 Microsoft