0

I'm tryng to build an Office Addin but now I'm stucked in this validation error for a very long time

            <Control xsi:type="Button" id="AboutButton.Label">
                  <Label resid="AboutButton.Label"/>
                  <Supertip>
                    <Title resid="AboutButton.Label"/>
                    <Description resid="AboutButton.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.about.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>redirectAbout</FunctionName>
                      <SourceLocation resid="Commands.Url"/>
                  </Action>
                  <Enabled>true</Enabled>
                </Control>```

The error is :

Error #1: XML Schema Validation Error: Error found during XML Schema validation.

  • Details: The element 'Action' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides' has invalid child element 'SourceLocation' in namespace 'http://schemas.microsoft.com/office/taskpaneappversionoverrides'.
  • Line: 263
  • Column: 24



I'm get this error for all <Action> ... </Action> I have

2 Answers 2

0

You can't have a <SourceLocation> when the Action's xsi:type is "ExecuteFunction". The resid of the file with the function is specified with the FunctionFile element, the first child of the <DesktopFormFactor> element.

Sign up to request clarification or add additional context in comments.

Comments

0

You can't place both the SourceLocation and the FuncationName element inside the Action elements, for example, see the following example below:

      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url"/>
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="msgReadGroup">
                <Label resid="GroupLabel"/>
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <Label resid="TaskpaneButton.Label"/>
                  <Supertip>
                    <Title resid="TaskpaneButton.Label"/>
                    <Description resid="TaskpaneButton.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
                <Control xsi:type="Button" id="ActionButton">
                  <Label resid="ActionButton.Label"/>
                  <Supertip>
                    <Title resid="ActionButton.Label"/>
                    <Description resid="ActionButton.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>action</FunctionName>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>

The FunctionFile is declared at the top, a child node of the DesktopFormFactor element.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.