none
Invalid child element Iconurl RRS feed

  • Question

  • I have finished creating a taskpane Office app in Visual Studio 13.
    When i Publish the project, It works fine.

    On clicking Package the app

    Following error occurs:

    Error 2 The element 'OfficeApp' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.0' has invalid child element 'IconUrl' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.0'. List of possible elements expected: 'AppDomains, VersionOverrides, Capabilities' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.0'.

    Any help would be appreciated.
    I am applying for MSP india So I need my app published quickly.

    • Moved by Jonathan S - MSFT Monday, February 3, 2014 7:57 PM Moving to Developing Apps for Office 2013 for help with tools/development
    Tuesday, January 28, 2014 2:32 PM

Answers

  • Hi! 

    Even i am trying for MSP India.

    This how you should go : - 

    type this in your XML manifest :

      

    <xs:IconUrl DefaultValue="urltoimage" />

    image should be 32 X 32 pixels .

    Also,

    include xmlns:xs="http://schemas.microsoft.com/office/appforoffice/1.0"

    <OfficeApp> tag , so the office app tag would look something like

    <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp" xmlns:xs="http://schemas.microsoft.com/office/appforoffice/1.0">

    This should do it.

    Yash Vijay

    • Proposed as answer by YashVj Monday, February 3, 2014 12:50 PM
    • Marked as answer by George HuaModerator Tuesday, February 4, 2014 7:09 AM
    Friday, January 31, 2014 8:12 AM

All replies

  • Hi! 

    Even i am trying for MSP India.

    This how you should go : - 

    type this in your XML manifest :

      

    <xs:IconUrl DefaultValue="urltoimage" />

    image should be 32 X 32 pixels .

    Also,

    include xmlns:xs="http://schemas.microsoft.com/office/appforoffice/1.0"

    <OfficeApp> tag , so the office app tag would look something like

    <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp" xmlns:xs="http://schemas.microsoft.com/office/appforoffice/1.0">

    This should do it.

    Yash Vijay

    • Proposed as answer by YashVj Monday, February 3, 2014 12:50 PM
    • Marked as answer by George HuaModerator Tuesday, February 4, 2014 7:09 AM
    Friday, January 31, 2014 8:12 AM
  • Above is not a solution (at least it didn't work for me). What I figured out is that if you use the GUI to add the IconUrl (which you must include in order for the app to be publishable to the office store). Then the GUI doesn't respect the XSD schame that the manifest file is validated against during build. The manifest states that all child elements of OfficeApp must come in the same order as the XSD dictates. This order is IconUrl before SupportUrl. The complete ordering are:

      <xs:element name="Id" type="UUID" minOccurs="1" maxOccurs="1">
      <xs:element name="AlternateId" type="AlternateId" minOccurs="0" maxOccurs="1">
       <xs:element name="Version" type="Version" minOccurs="1" maxOccurs="1">  <xs:element name="ProviderName" type="ShortString" minOccurs="1" maxOccurs="1">   <xs:element name="DefaultLocale" type="CultureName" minOccurs="1" maxOccurs="1">
       <xs:element name="DisplayName" type="ShortLocaleAwareSetting" minOccurs="1" maxOccurs="1">   <xs:element name="Description" type="LongLocaleAwareSetting" minOccurs="1" maxOccurs="1">    <xs:element name="IconUrl" type="URLLocaleAwareSetting" minOccurs="0" maxOccurs="1">  <xs:element name="SupportUrl" type="URLLocaleAwareSetting" minOccurs="0" maxOccurs="1">    <xs:element name="AppDomains" type="AppDomains" minOccurs="0" maxOccurs="1">    <xs:element name="VersionOverrides" xmlns="http://schemas.microsoft.com/office/versionoverrides/1.0" minOccurs="0" maxOccurs="1">

    Why the GUI doesn't obey this is beyond me, (must be a bug). But the simple solution is to just ensure the order is correct in the xml file, by editing it by hand. 

    I have blogged about how I figured this our on my personal blog: http://wp.sjkp.dk/officeapp-2013-outlook-mail-app-unable-to-validate-xml/ 

    • Proposed as answer by sjkp.dk Wednesday, February 26, 2014 9:50 PM
    Wednesday, February 26, 2014 9:47 PM