Skip to content

Commit e58cd37

Browse files
author
github-actions
committed
Merge branch 'main' into live
2 parents ab2e4e0 + ac4b65d commit e58cd37

File tree

4 files changed

+160
-69
lines changed

4 files changed

+160
-69
lines changed

docs/develop/convert-xml-to-json-manifest.md

Lines changed: 12 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,19 @@
22
title: Convert an add-in to use the unified manifest for Microsoft 365
33
description: Learn the various methods for converting an add-in with an add-in only manifest to the unified manifest for Microsoft 365 and sideload the add-in.
44
ms.topic: how-to
5-
ms.date: 04/22/2025
5+
ms.date: 05/08/2025
66
ms.localizationpriority: medium
77
---
88

99
# Convert an add-in to use the unified manifest for Microsoft 365
1010

11-
To add Teams capabilities to an add-in that uses the add-in only manifest, or to just future proof the add-in, you need to convert it to use the unified manifest for Microsoft 365.
12-
13-
> [!NOTE]
14-
>
15-
> - Projects created in Visual Studio, as distinct from Visual Studio Code, can't be converted at this time.
16-
> - If you [created the project with Teams Toolkit](teams-toolkit-overview.md) or with the "unified manifest" option in the [Yeoman generator for Office Add-ins (Yo Office)](yeoman-generator-overview.md), it already uses the unified manifest.
11+
To add Teams capabilities or a Copilot extension to an add-in that uses the add-in only manifest, or to just future proof the add-in, you need to convert it to use the unified manifest for Microsoft 365.
1712

1813
[!INCLUDE [Unified manifest support note for Office applications](../includes/unified-manifest-support-note.md)]
1914

2015
There are three basic tasks to converting an add-in project from the add-in only manifest to the unified manifest.
2116

22-
- Ensure that your add-in is ready to convert.
17+
- Ensure that your manifest is ready to convert.
2318
- Convert the XML-formatted add-in only manifest itself to the JSON format of the unified manifest.
2419
- Package the new manifest and two icon image files (described later) into a zip file for sideloading or deployment. *Depending on how you sideload the converted add-in, this task may be done for you automatically.*
2520

@@ -31,7 +26,7 @@ There are three basic tasks to converting an add-in project from the add-in only
3126
> - Projects created in Visual Studio, as distinct from Visual Studio Code, can't be converted at this time.
3227
> - If you [created the project with Teams Toolkit](teams-toolkit-overview.md) or with the "unified manifest" option in the [Office Yeoman Generator](yeoman-generator-overview.md), it already uses the unified manifest.
3328
34-
## Ensure that your add-in is ready to convert
29+
## Ensure that your manifest is ready to convert
3530

3631
The following sections describe conditions that must be met before you convert the manifest.
3732

@@ -66,7 +61,7 @@ The following markup is an example.
6661

6762
### Reduce the number of add-in commands as needed
6863

69-
An add-in that uses the unified manifest may not have more than 20 [add-in commands](../design/add-in-commands.md). If the total number of [**\<Action\>** elements](/javascript/api/manifest/action) in the add-in only manifest is greater than 20, you must redesign the add-in to have no more than 20.
64+
An add-in that uses the unified manifest may not have more than 20 [add-in commands](../design/add-in-commands.md). If the total number of [**\<Action\>** elements](/javascript/api/manifest/action) in the add-in only manifest is greater than 20, you must redesign the add-in to have no more than 20.
7065

7166
### Update the add-in ID, version, domain, and function names in the manifest
7267

@@ -83,7 +78,7 @@ An add-in that uses the unified manifest may not have more than 20 [add-in comma
8378
8479
### Shorten string values as needed
8580

86-
Review and change, as needed, the manifest values in light of the following effects of the conversion.
81+
Review and change, as needed, manifest values in light of the following effects of the conversion.
8782

8883
- The first 30 characters of `<DisplayName>` becomes the value of [`"name.short"`](/microsoft-365/extensibility/schema/root-name#short) in the unified manifest.
8984
- The first 100 characters of `<DisplayName>` becomes the value of [`"name.full"`](/microsoft-365/extensibility/schema/root-name#full) in the unified manifest.
@@ -103,52 +98,15 @@ Resolve any problems before you attempt to convert the project.
10398

10499
There are several ways to carry out the remaining tasks, depending on the IDE and other tools you want to use for your project, and on the tool you used to create the project.
105100

106-
- [Convert the project with Teams Toolkit](#convert-the-project-with-teams-toolkit)
107101
- [Convert projects created with the Yeoman generator for Office Add-ins (aka "Yo Office")](#convert-projects-created-with-the-yeoman-generator-for-office-add-ins-aka-yo-office)
108102
- [Convert NodeJS and npm projects that weren't created with the Yeoman generator for Office Add-ins (Yo Office)](#convert-nodejs-and-npm-projects-that-werent-created-with-the-yeoman-generator-for-office-add-ins-yo-office)
109103

110-
### Convert the project with Teams Toolkit
111-
112-
The easiest way to convert is to use Teams Toolkit.
113-
114-
#### Prerequisites
115-
116-
- Install [Visual Studio Code](https://code.visualstudio.com/)
117-
- Install [Teams Toolkit](/microsoftteams/platform/toolkit/install-teams-toolkit?tabs=vscode#install-teams-toolkit-for-visual-studio-code)
118-
119-
#### Import the add-in project to Teams Toolkit
120-
121-
1. Open Visual Studio Code and select the Teams Toolkit icon on the **Activity Bar**.
122-
123-
:::image type="content" source="../images/teams-toolkit-icon.png" alt-text="Teams Toolkit icon.":::
124-
125-
1. Select **Create a New App**.
126-
1. The **New Project** dropdown menu opens. The options listed will vary depending on your version of Teams Toolkit. Select **Office Add-in**.
127-
128-
:::image type="content" source="../images/teams-toolkit-create-office-add-in.png" alt-text="The options in New Project dropdown menu. One option is called 'Office Add-in'.":::
129-
130-
1. The **App Features Using an Office Add-in** dropdown menu opens. The options listed will vary depending on your version of Teams Toolkit. Select **Upgrade an Existing Office Add-in**.
131-
132-
:::image type="content" source="../images/teams-toolkit-create-office-import-capability.png" alt-text="The options in the App Features Using an Office Add-in dropdown menu. The 'Upgrade an Existing Office Add-in' option is selected.":::
133-
134-
1. In the **Existing add-in project folder** dropdown menu, browse to the root folder of the add-in project.
135-
1. In the **Select import project manifest file** dropdown menu, browse to the add-in only manifest file, typically named **manifest.xml**.
136-
1. In the **Workspace folder** dialog, select the folder where you want to put the converted project.
137-
1. In the **Application name** dialog, give a name to the project (with no spaces). Teams Toolkit creates the project with your source files and scaffolding. It then opens the project *in a second Visual Studio Code window*. Close the original Visual Studio Code window.
138-
139-
#### Sideload the add-in in Visual Studio Code
140-
141-
You can sideload the add-in using the Teams Toolkit or in a command prompt, bash shell, or terminal. For more information, see:
142-
143-
- [Sideload with Teams toolkit](../testing/sideload-add-in-with-unified-manifest.md#sideload-with-the-teams-toolkit)
144-
- [Sideload with a system prompt, bash shell, or terminal](../testing/sideload-add-in-with-unified-manifest.md#sideload-with-a-system-prompt-bash-shell-or-terminal)
145-
146104
> [!NOTE]
147-
> Add-ins that use the unified manifest can be sideloaded only on Office Version 2304 (Build 16320.20000) or later.
105+
> Conversion of the manifest is one of the effects of importing the add-in project into Teams Toolkit if you do so using the toolkit's importation feature. For details, see [Import an add-in project to Teams Toolkit](import-teams-toolkit.md)
148106
149107
### Convert projects created with the Yeoman generator for Office Add-ins (aka "Yo Office")
150108

151-
If the project was created with the Yeoman generator for Office Add-ins and you don't want to use the Teams Toolkit, convert it using the following steps.
109+
If the project was created with the Yeoman generator for Office Add-ins, convert it using the following steps.
152110

153111
1. In the root of the project, open a command prompt or bash shell and run the following command. This converts the manifest and updates the package.json to specify current tooling packages. The new unified manifest is in the root of the project and the old add-in only manifest is in a backup.zip file. For details about this command, see [Office-Addin-Project](https://www.npmjs.com/package/office-addin-project).
154112

@@ -161,7 +119,7 @@ If the project was created with the Yeoman generator for Office Add-ins and you
161119
162120
### Convert NodeJS and npm projects that weren't created with the Yeoman generator for Office Add-ins (Yo Office)
163121
164-
If you don't want to use the Teams Toolkit and your project wasn't created with Yo Office, use the office-addin-manifest-converter tool.
122+
If your project wasn't created with Yo Office, use the office-addin-manifest-converter tool.
165123
166124
In the root of the project, open a command prompt or bash shell and run the following command. This command puts the unified manifest in a subfolder with the same name as the filename stem of the original add-in only manifest. For example, if the manifest is named **MyManifest.xml**, the unified manifest is created at **.\MyManifest\MyManifest.json**. For more details about this command, see [Office-Addin-Manifest-Converter](https://www.npmjs.com/package/office-addin-manifest-converter).
167125
@@ -171,6 +129,9 @@ npx office-addin-manifest-converter convert <relative-path-to-XML-manifest>
171129

172130
Once you have the unified manifest created, there are two ways to create the zip file and sideload it. For more information, see [Sideload other NodeJS and npm projects](../testing/sideload-add-in-with-unified-manifest.md#sideload-other-nodejs-and-npm-projects).
173131

132+
> [!NOTE]
133+
> If the original add-in only manifest used any **\<Override\>** elements to localize strings in the manifest, then the conversion process produces JSON string files for each localized language. These files must also be included in the zip file, and they must be at the relative path indicated in the [`"localizationInfo.additionalLanguages.file"`](/microsoft-365/extensibility/schema/root-localization-info-additional-languages#file) property.
134+
174135
## Next steps
175136

176137
Consider whether to maintain both the old and new versions of the add-in. See [Manage both a unified manifest and an add-in only manifest version of your Office Add-in](../concepts/duplicate-legacy-metaos-add-ins.md).

0 commit comments

Comments
 (0)