Now that you understand the four main parts of an app you can begin the process of packaging and publishing your own app. When you package an app you essentially take the Web deploy package, database package, SharePoint solution package and app.manifest and combine them into an .app file. After you have an .app file you are ready to publish it to a location where users can install it. You can publish an app either using a private app catalog or the public SharePoint store. The following sections walk you through publishing to a private app catalog and Chapter 8, “Distributing SharePoint 2013 Apps,” discusses publishing to the public SharePoint store.
After you have completed developing an app and are ready to deploy it to either an on-premises SharePoint farm or to SharePoint Online, you need to get it ready for deployment by packaging it.
As Chapter 3, “Developer Tooling for SharePoint 2013” discusses, Visual Studio 2012 provides some excellent tools to increase your productivity when writing SharePoint apps, but the help doesn’t stop there. Visual Studio provides a number of tools to help you package your apps into .app files for either automated or manual deployment. In fact, when you press F5 to debug an application, Visual Studio packages the app and deploys it automatically to SharePoint for you!
Visual Studio provides integrated publishing wizards that guide you through the process of packaging your application. This wizard varies depending on the type of application you have built, but in each type the process starts by using the Publish function available when you right-click your application project. See Figure 7-3.
Depending on the type of app you have built, the deployment wizard varies and requires different information. For example, in some cases it asks for a client ID and client secret whereas in SharePoint-hosted apps no additional information is needed at all. The following section, “Deploying an App,” explores the deployment process in more detail for each type of application package and walks through examples of each.
Before an application can be installed you must publish it to either a private app catalog, on premises or in SharePoint Online, or in the public Marketplace provided by Microsoft. Many organizations may want to build applications that only they intend to use, or they may turn off the ability to purchase apps from the Marketplace and only offer apps they provide in the private app catalog. The app catalog enables organizations to offer a private and curated app catalog that they control to users in the organization.
An app catalog is simply a SharePoint site based on a provided template. An organization can create and configure an app catalog in a few simple steps and offer users a curated list of apps with which the organization is comfortable with. After you create the apps, installing them from the catalog into a site is seamless and integrated into the existing app installation process.
In following exercise you will learn how to create a new app catalog for privately deploying apps to.