Publish your add-in using Visual Studio

Your Office Add-in package contains an XML manifest file that you'll use to publish the add-in. You'll have to publish the web application files of your project separately. This article describes how to deploy your web project and package your add-in by using Visual Studio 2019.

Note

For information about publishing an Office Add-in that you created using the Yeoman generator and developed with Visual Studio Code or any other editor, see Publish an add-in developed with Visual Studio Code.

To deploy your web project using Visual Studio 2019

Complete the following steps to deploy your web project using Visual Studio 2019.

  1. From the Build tab, choose Publish [Name of your add-in].

  2. In the Pick a publish target window, choose one of the options to publish to your preferred target. Each publish target requires you to include more information to get started, such as an Azure Virtual Machine or folder location. Once you have specified a publish location and filled in all of the information required, select Publish

    Note

    Picking a publish target specifies the server you are deploying to, the credentials needed to log on to the server, the databases to deploy, and other deployment options.

  3. For more information about deployment steps for each publish target option, see First look at deployment in Visual Studio.

To package and publish your add-in using IIS, FTP, or Web Deploy using Visual Studio 2019

Complete the following steps to package your add-in using Visual Studio 2019.

  1. From the Build tab, choose Publish [Name of your add-in].

  2. In the Pick a publish target window, choose IIS, FTP, etc, and select Configure. Next, select Publish.

  3. A wizard appears that will help guide you through the process. Ensure the publish method is your preferred method, such as Web Deploy.

  4. In the Destination URL box, enter the URL of the website that will host the content files of your add-in, and then select Next. If you plan to submit your add-in to AppSource, you can choose the Validate Connection button to identify any issues that will prevent your add-in from being accepted. You should address all issues before you submit your add-in to the store.

  5. Confirm any settings desired including File Publish Options and select Save.

    Important

    While not strictly required in all add-in scenarios, using an HTTPS endpoint for your add-in is strongly recommended. Add-ins that are not SSL-secured (HTTPS) generate unsecure content warnings and errors during use. If you plan to run your add-in in Office on the web or publish your add-in to AppSource, it must be SSL-secured. If your add-in accesses external data and services, it should be SSL-secured to protect data in transit. Self-signed certificates can be used for development and testing, so long as the certificate is trusted on the local machine. Azure websites automatically provide an HTTPS endpoint.

You can now upload your XML manifest to the appropriate location to publish your add-in. You can find the XML manifest in OfficeAppManifests in the app.publish folder. For example:

%UserProfile%\Documents\Visual Studio 2019\Projects\MyApp\bin\Debug\app.publish\OfficeAppManifests

See also