OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
825 stars 208 forks source link

No option to generate a ContentApp or MailApp #835

Closed mebbert closed 1 month ago

mebbert commented 1 month ago

Expected behavior

tl;dr: The generator only generates TaskPaneApp and doesn't provide options to generate MailApp or ContentApp.

Longer description: This is my first time writing an add-in for Office, but my understanding is that there are three basic types of projects (i.e., xsi:type options) per documentation: a (1) ContentApp, (2) MailApp, or (3) TaskPaneApp.

When using yo office, there are six options where five result in a TaskPaneApp. The sixth option manifest is supposed to generate a 'manifest only', but the manifest itself still defines the add-in as xsi:type="TaskPaneApp"

Current behavior

Please provide information about the failure. What is the current behavior? If it is not a bug, please add it to UserVoice, so that it gets added to our feature roadmap.

The above UserVoice apparently doesn't exist anymore.

Rick-Kirkham commented 1 month ago

If you choose Outlook as the Office application, you get a MailApp.

There is no combination of choices that generates a ContentApp. This is because this type of add-in has never been common and there's been no demand for projects that start as a ContentApp. To create a content add-in, choose task pane, React, or SSO as the type of project, and then choose either Excel or PowerPoint as the Office application. After the project is created, you will then need to change the <OfficeApp xsi:type= ... > to ContentApp, and delete everything in the <VersionOverrides> element except the <WebApplicationInfo> element, if there is one. (If there isn't, then just delete the whole of the <VersionOverrides> element.) The manifest should look similar to the one at Content.

I don't think Yo Office will ever support direct creation of a content add-in because there's been no demand for this and it would cost too much labor to create and maintain the template for one.

If you use Visual Studio to create an Office Add-in, then for Excel and PowerPoint, you do get the option of creating a content add-in.