5 out of 6 rated this helpful - Rate this topic

How to: Package apps for SharePoint for publishing by using Visual Studio

apps for Office

Published: July 16, 2012

How to

Learn how to package your app for SharePoint by using Visual Studio 2012.

Applies to:  apps for SharePoint | Office 365 | SharePoint Foundation 2013 | SharePoint Server 2013 

  • Microsoft Visual Studio 2012

  • Office Developer Tools for Visual Studio 2012

  • Microsoft SharePoint 2013

When you are ready to package your app for SharePoint, open the Publish Office Apps wizard, which prepares the files in your app for SharePoint for publishing.

To package the files in your solution

  1. In Solution Explorer, open the shortcut menu for the app for SharePoint project, and then choose Publish.

    The Publish Office Apps wizard appears. The type of app for SharePoint that you’re packaging determines the pages that appear in the wizard. If your app will be SharePoint-hosted or autohosted, only the Summary page appears. If your app will be provider-hosted, the Profile and Hosting pages also appear.

  2. If your app for SharePoint is provider-hosted, specify a publishing profile name in the Which profile do you wish to publish? list, and then choose the Next button.

    The publishing profile saves the information that you enter in the Hosting page.

  3. In the Where is your website hosted? list, specify the URL for the web application that will host your app for SharePoint.

  4. In the boxes under What is the identity of your app?, specify the client ID and client secret for your app, and then choose the Next button.

    For more information, see Authorization and authentication for apps in SharePoint 2013.

  5. For all types of apps for SharePoint, select the Open output folder after successful packaging check box, if it isn’t already selected, and then choose the Finish button.

    Visual Studio generates all of the files that you need to publish your app for SharePoint. You can find these files in the app.Publish folder of your project output folder (for example, %UserProfile%\Documents\Visual Studio 2012\Projects\MyApp\bin\Debug\app.publish). That folder will contain a .app file for your app for SharePoint and multiple files for the web application (if your app for SharePoint is cloud-based). All apps for SharePoint include an .app file, which is the app manifest to publish the app for SharePoint. Autohosted and provider-hosted apps for SharePoint also include files for publishing the host web application.

To publish your app for SharePoint, upload the app manifest file (.app) of your app to the Office Store, the Apps for Office catalog, SharePoint, a file share, or the Exchange catalog. The app manifest for your app is located in the app.publish folder, such as, %UserProfile%\Documents\Visual Studio 2012\Projects\MyApp\bin\Debug\app.publish. For more information about how to publish your app for SharePoint, see Authorization and authentication for apps in SharePoint 2013.

If your app for SharePoint is provider-hosted, you must publish the web application to a web server. Visual Studio generates a deployment package and a script to help you perform this task. If your app for SharePoint is autohosted, SharePoint automatically provisions the web application, and you don't need to do anything else.

Note Note

The infrastructure for autohosted apps will remain in preview status for a period of time after SharePoint 2013 releases. Autohosted apps (which includes all apps that depend on Access) will not be accepted by the Office Store during this preview phase. We will update dev.office.com with information about autohosted apps as it becomes available.

The deployment package of the web application project is contained in a compressed (.zip) file in the app.publish folder. In addition to the .zip file, the app.publish folder contains the following files:

File

Description

ProjectName.deploy.cmd

This file is a command-line batch file that invokes Web Deploy so that you can more easily install the package at a command prompt.

ProjectName.SetParameters.xml

This file contains parameters that are passed to Web Deploy when you use the deploy.cmd file to install the package. The Visual Studio package settings determine the default value that's specified for each parameter. You can change these values if, for example, you want to install the web application to multiple servers and use different settings for each server.

ProjectName.SourceManifest.xml

This file contains settings that Visual Studio passes to Web Deploy and that Web Deploy uses to create the web package. Web Deploy requires this file only to create the package. This file isn't used when the package is installed.

For step-by-step guidance, see How to: Install a Deployment Package Using the deploy.cmd File Created by Using Visual Studio

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.