约会 Outlook 插件的 ItemSend 事件引发清单验证错误

发布于 2025-01-13 11:24:53 字数 7151 浏览 3 评论 0原文

我正在尝试将发送处理程序分配给 Outlook 插件中的约会函数。我严格遵循 手动,但清单验证时出现错误

Error #1: 
Mailbox add-in containing ItemSend event is invalid.: Mailbox add-in containing ItemSend event is invalid.
  - Details: Mailbox add-in manifest contains ItemSend event in VersionOverrides which is not allowed.

我的清单.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
  xsi:type="MailApp">
  <Id>90992a37-6ac0-4e31-8f4d-c35d61ac033b</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>CKT (dev)</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  
  <DisplayName DefaultValue="Sync events with CKT Portal (dev)"/>
  
  <Description DefaultValue="Sync events of Outlook with CKT portal (dev)"/>
  
  <IconUrl DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt.gif"/>
  <HighResolutionIconUrl DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt-128x128.gif"/>
  <SupportUrl DefaultValue="https://ckt-d.internal.epo.org"/>

  <AppDomains>
    <AppDomain>https://ckt-d.internal.epo.org</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.8"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/taskpane.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
  </Rule>

  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <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">

      <Requirements>
        <bt:Sets DefaultMinVersion="1.8">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="Taskpane.Url"/>
            <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="apptComposeDemoGroup">
                  <Label resid="groupLabel" />
                  <!-- Task pane button -->
                  <Control xsi:type="Button" id="TaskpaneButton">
                    <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>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="apptReadDemoGroup">
                  <Label resid="groupLabel" />
                  <!-- Task pane button -->
                  <Control xsi:type="Button" id="TaskpaneButton2">
                    <Label resid="TaskpaneButton2.Label" />
                    <Supertip>
                      <Title resid="TaskpaneButton2.Label" />
                      <Description resid="TaskpaneButton2.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>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="Events">
              <Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="validateBody" />
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
    
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt.gif"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt-32x32.gif"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt-80x80.gif"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/taskpane.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue="CKT Add-in (dev)"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="CKT (dev)"/>
          <bt:String id="TaskpaneButton2.Label" DefaultValue="CKT (dev)"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Sync Outllook events with CKT as Organizer (dev)"/>
          <bt:String id="TaskpaneButton2.Tooltip" DefaultValue="Sync Outllook events with CKT as Attendee (dev)"/>
        </bt:LongStrings>
      </Resources>

    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

我缺少什么?

I'm trying to have an on send handler assigned to a function within an Outlook addin for an Appointment. I strictly follow the manual, but I'm getting an error on the manifest validation

Error #1: 
Mailbox add-in containing ItemSend event is invalid.: Mailbox add-in containing ItemSend event is invalid.
  - Details: Mailbox add-in manifest contains ItemSend event in VersionOverrides which is not allowed.

My manifest.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
  xsi:type="MailApp">
  <Id>90992a37-6ac0-4e31-8f4d-c35d61ac033b</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>CKT (dev)</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  
  <DisplayName DefaultValue="Sync events with CKT Portal (dev)"/>
  
  <Description DefaultValue="Sync events of Outlook with CKT portal (dev)"/>
  
  <IconUrl DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt.gif"/>
  <HighResolutionIconUrl DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt-128x128.gif"/>
  <SupportUrl DefaultValue="https://ckt-d.internal.epo.org"/>

  <AppDomains>
    <AppDomain>https://ckt-d.internal.epo.org</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.8"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/taskpane.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
  </Rule>

  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <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">

      <Requirements>
        <bt:Sets DefaultMinVersion="1.8">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="Taskpane.Url"/>
            <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="apptComposeDemoGroup">
                  <Label resid="groupLabel" />
                  <!-- Task pane button -->
                  <Control xsi:type="Button" id="TaskpaneButton">
                    <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>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="apptReadDemoGroup">
                  <Label resid="groupLabel" />
                  <!-- Task pane button -->
                  <Control xsi:type="Button" id="TaskpaneButton2">
                    <Label resid="TaskpaneButton2.Label" />
                    <Supertip>
                      <Title resid="TaskpaneButton2.Label" />
                      <Description resid="TaskpaneButton2.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>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="Events">
              <Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="validateBody" />
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
    
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt.gif"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt-32x32.gif"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/ckt-80x80.gif"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://ckt-d.internal.epo.org/addins/outlook/taskpane.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue="CKT Add-in (dev)"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="CKT (dev)"/>
          <bt:String id="TaskpaneButton2.Label" DefaultValue="CKT (dev)"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Sync Outllook events with CKT as Organizer (dev)"/>
          <bt:String id="TaskpaneButton2.Tooltip" DefaultValue="Sync Outllook events with CKT as Attendee (dev)"/>
        </bt:LongStrings>
      </Resources>

    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

What am I missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

囍孤女 2025-01-20 11:24:53
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文