I am using Visual Studio for creating excel add-in. I also have some server-side code because of which i am using Visual Studio. I wanted to configure shared javascript runtime so that i can open the taskpane using keyboard shortcut.
I see an example here but it is using Yeoman generator. I have seen this for how to setup the keyboard shortcuts.
I am getting following errors when adding 'Runtimes' tag under 'Host' tag and 'ExtendedOverrides' tag after 'VersionOverrides' tag respectively.
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'.
Error The element 'OfficeApp' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.1' has invalid child element 'ExtendedOverrides' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.1'. List of possible elements expected: any element in namespace 'http://www.w3.org/2000/09/xmldsig#'.
Please let me know if there is any example Visual Studio project demonstrating the use of shared javascript runtime.
Thanks, Naveen
CodePudding user response:
The manifest schema files that are installed with VS are out of date. You have to manually update them.
- In Solution Explorer, open the manifest.xml file. The manifest is typically in the first project under your solution.
- Choose View > Properties Window (F4).
- In the Properties Window, choose the ellipsis (...) to open the XML Schemas editor. Here you can find the exact folder location of all schema files your project uses.
- Open the XSD file you want to update in a text editor. The schema name from the validation error will correlate to the XSD file name. For example, open TaskPaneAppVersionOverridesV1_0.xsd. Locate the updated schema at [MS-OWEMXML]: Appendix A: Full XML Schema. For example, TaskPaneAppVersionOverridesV1_0 is at taskpaneappversionoverrides Schema. 5.Copy the text into your text editor.
- Save the updated XSD file.
- Restart Visual Studio to pick up the new XSD file changes.
You can repeat the previous process for any additional schemas that are out-of-date.