1

I'm creating an Outlook add-in, and I want to try out the new module extension. However, following the example from: https://dev.office.com/docs/add-ins/outlook/extension-module-outlook-add-ins, I get an error when creating the manifest.

<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
    ...
  </VersionOverrides>
</VersionOverrides>

the error occurs on the second VersionOverrides with the message:

"The element 'VersionOverrides' in namespace 'http: // schemas microsoft com/office/mailappversionoverrides' has invalid child element 'VersionOverrides' in namespace 'http:// schemas microsoft com/office/mailappversionoverrides/1.1'. List of possible elements expected: 'Description, Requirements, Hosts' in namespace 'http:// schemas microsoft com/office/mailappversionoverrides'."

since I can't post more than 2 links, I have replaced the . in the URLs with spaces.

It seems odd to me to include a versionoverride inside a versionoverride, but if I change the first one by any means, VS won't accept it as following the schema. Likewise, if I don't include the second versionoverride, VS gives the following error:

"This is an invalid xsi:type 'http:// schemas microsoft com/office/mailappversionoverrides:Module'."

The rest of the manifest i almost symmetrical to the example from officeDev, apart from elements like Title and Id.

What am I doing wrong?

Benoit Patra
  • 4,355
  • 5
  • 30
  • 53

2 Answers2

0

personally, I stopped using XSD validation from Visual Studio with Addin manifest. But what you should do is updating the the XSD file for XML schema validation to support the new version overrides. Check the following resources:

In addition, you should take care of the following situation when using modules. Here is another example on GitHub of modules declaration.

Community
  • 1
  • 1
Benoit Patra
  • 4,355
  • 5
  • 30
  • 53
  • Thank you very much for your quick answer. I have tried what you posted, but to no avail. I still get the same error. I have made sure the new .xsd is being used, and that everything from VS to Office.js is up to date. I should have a proper version of Outlook, but I can't even run the program, so I can't be sure. It is a newer version than the one mentioned in the post. Looking at the example you posted as well, it is the same problem for me :( – Anders Looft Oct 27 '16 at 14:17
  • @AndersLooft "looking at the same example you posted" you mean you cannot make modules loading in your outlook or is it only about XML validation? – Benoit Patra Oct 27 '16 at 14:58
  • I have not tried sideloading if that's what you mean? My primary problem is to make VS run my app – Anders Looft Oct 27 '16 at 17:03
  • You should segregate definitely VS and your addin. The addin is actually just an xml file that tells outlook what is the url of the addin web page. Remind that you addin is only a web page with a small javascript library (office.js) that fills the gap between your addin web page and the application host (outlook). I am guessing you write an ASP.net project so you must be able to select this asp.net web project as "Startup project" , Run and browse the url from here (something like https://localhost:XXX). Then install your manifest manually(check that urls starts with https://localhost:XXX) – Benoit Patra Oct 27 '16 at 17:16
  • In this repo https://github.com/jasonjoh/command-demo The Readme.md explains how to install the manifest manually (from outlook web app). The interface has changed since the screenshots now you should see a small strings "Click here to install custom addin". Note: that this repo do not use Visual Studio at all, you do not really need VS to develop web addins. You need VS for you ASP.net web project. – Benoit Patra Oct 27 '16 at 17:20
  • I can confirm that using Visual Studio to create a Module Add-in is not supported. (at least if you are clicking "run" and trying to just make it work that way) You can still create the file in VS if you want. Instead you should create the XML as a file and then sideload that as mentioned above. If you are still having problems, can you upload the XML manifest that you are trying to upload so we can take a look? – Tim Wan Oct 28 '16 at 01:06
  • http://pastebin.com/wd1ibyeG This is the XML file. I have problems with Azure atm, so I can't deploy it right now, but I will report back as soon as possible. I have developed several other office add-ins, and never had this problem, would be a shame if I had to deploy it every time I wanted to test it :S – Anders Looft Oct 28 '16 at 06:16
  • Follow up: I can deploy then app and sideload it. It works. I guess I just have to deploy it every time I make changes/need to test? On https://dev.office.com/docs/add-ins/outlook/extension-module-outlook-add-ins?product=outlook it says "Note: Module extensions are available only in Office 2016." - does that mean it does not work in office online? – Anders Looft Oct 28 '16 at 07:46
  • @AndersLooft I had a look at your manifest. IMHO do not use ~remoteAppUrl stuff. Use a plain old localhost url for localdev (i.e. `https://localhost:XXXX`) with a name for your addin that shows it is for debugging (i.e TimeTurtleLocalDebug) and an that is only for local dev. Create a script that will patch the XML and replace those values by real production ones: `https://prod.timeturtle.com`, TimeTurte, the Guid ID for production. Use only sideloading, hence you will have two addins that can live side by side in your mailbox and you can develop easily locally without confusion. – Benoit Patra Oct 28 '16 at 08:38
  • Thank you. That manifest was copied from the VS source, the one I deploy obvious has the right address in place of ~remoteAppUrl. Changing the VS version would not make sense, as VS will not run it without the VersionOverrides being fixed, as described in OP. I have marked this issue as resolved, not because I got it fixed, but because there was a work-around. Thank you very much – Anders Looft Oct 28 '16 at 08:42
  • VS guys did a great job with these "Office addin" project, they created build targets so that you test just by building the project. It is cool for the first try (and to attach the JS VS debugger). Everything works out-of-the-box. But as time goes and you start having local dev, pre prod, prod environment, continuous integration etc. this VS based approach is not really adapted. I do not use this VS Office Addin project anymore. – Benoit Patra Oct 28 '16 at 08:47
0

You do not need Visual Studio to build the add-in manifest. The manifest is a simple XML file that you can create in notepad as well and simply upload from your manage integrations(previously manage add-ins) page.

The VS XSD may not be updated to support VO1.1. You can create the XML in VS and not worry about the VersionOverride error due to its XSD validation.

Simply go ahead and install the XML from manage integrations using Add from file option and you should be good to go!

Unheilig
  • 16,196
  • 193
  • 68
  • 98
AnOberoi
  • 86
  • 3