Office Add-In Shared Runtime Error Invalid child element 'Runtimes'

Osvath, Andy 1 Reputation point
2021-06-04T13:02:44.457+00:00

I am trying to implement the JavaScript Shared Runtime for an Office.js Excel Add-in, but when I add the <Runtimes> element I get the following error:

The element 'Host' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides' has invalid child element 'Runtimes' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides'. List of possible elements expected: 'AllFormFactors, DesktopFormFactor' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides'.

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
870 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jayme Bandeira 26 Reputation points
    2021-06-16T16:12:58.973+00:00

    I fixed that by adding Runtimes to the local xsd file. In my machine it is located at:
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Xml\Schemas\1033\TaskPaneAppVersionOverridesV1_0.xsd

    Go to the corresponding schema and search for Runtimes, then add these parts to the local xsd file.
    https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-owemxml/82e93ec5-de22-42a8-86e3-353c8336aa40

    Note that this hasn't been tested with the add-in published to the Microsoft Store.

    1 person found this answer helpful.