使用1个功能部署3个ContentTypes - 仅部署2个

时间:2009-10-20 08:53:23

标签: sharepoint deployment content-type

我有一个功能,其中包含以下清单文件,用于定义多种内容类型:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ContentType ID="0x01008e5736f1388b4809a9f102da1e573ddb"
              Name="$Resources:Balticovo,ContentType_AgendaName"
              Group="$Resources:core,CustomContentTypesGroup"
              Description="$Resources:Balticovo,ContentType_AgendaDescription"
              Version="1">
    <FieldRefs>
      <!-- Jautājumu pacēla-->
      <FieldRef ID="{31b28519-c87e-4e0d-9c1b-d02c5e034cf9}" />
      <!-- Kam piešķirts -->
      <FieldRef ID="{53101f38-dd2e-458c-b245-0c236cc13d1a}" />
      <!-- Saistītās personas -->
      <FieldRef ID="{E5C80D9B-4E09-4457-A6A9-5A6F574DEDA5}" />
      <!-- Komentāri -->
      <FieldRef ID="{6df9bd52-550e-4a30-bc31-a4366832a87f}" />
      <!-- Izpildīt līdz -->
      <FieldRef ID="{cd21b4c2-6841-4f9e-a23a-738a65f99889}" />
    </FieldRefs>

    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">
        <spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events">
          <Receiver>
            <Name>AgendaToTaskOnAdd</Name>
            <Type>ItemAdded</Type>
            <SequenceNumber>10000</SequenceNumber>
            <Assembly>Balticovo.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5</Assembly>
            <Class>Balticovo.SharePoint.AgendaToTask</Class>
            <Data></Data>
            <Filter></Filter>
          </Receiver>
          <Receiver>
            <Name>AgendaToTaskOnUpdate</Name>
            <Type>ItemUpdating</Type>
            <SequenceNumber>10000</SequenceNumber>
            <Assembly>Balticovo.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5</Assembly>
            <Class>Balticovo.SharePoint.AgendaToTask</Class>
            <Data></Data>
            <Filter></Filter>
          </Receiver>
        </spe:Receivers>
      </XmlDocument>
    </XmlDocuments>
  </ContentType>

  <ContentType ID="0x0100AD4DFC626A3F4db492A4FCF91B0E47A0"
               Name="$Resources:Balticovo,ContentType_ReglarAttendeeName"
               Group="$Resources:core,CustomContentTypesGroup"
               Description="$Resources:Balticovo,ContentType_ReglarAttendeeDescription"
               Version="1">
    <FieldRefs>
      <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Required="FALSE" Hidden="TRUE" />
      <FieldRef ID="{37D4FF81-9DE1-436a-B270-923E93258507}" />
    </FieldRefs>
    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">
        <spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events">
          <Receiver>
            <Name>AddAttendeeToCurrentMeeting</Name>
            <Type>ItemAdded</Type>
            <SequenceNumber>10000</SequenceNumber>
            <Assembly>Balticovo.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5</Assembly>
            <Class>Balticovo.SharePoint.RegularAttendeesEventReceiver</Class>
            <Data></Data>
            <Filter></Filter>
          </Receiver>
        </spe:Receivers>
      </XmlDocument>
    </XmlDocuments>
  </ContentType>

  <ContentType ID="0x01008606FC8499F9407b83AF3DBAD6865F58"
             Name="$Resources:Balticovo,ContentType_WebApplicationQueryName"
             Group="$Resources:core,CustomContentTypesGroup"
             Description="$Resources:Balticovo,ContentType_WebApplicationQueryDescription"
             Version="1">
    <FieldRefs>
      <FieldRef ID="{acbe30d6-ea25-40a2-b6e5-9df76e9c881e}" />
      <FieldRef ID="{6c732395-7404-4ad4-9b03-50195b70c006}" />
      <FieldRef ID="{cb16a530-21ca-43b1-b270-dbb33fa3f7a7}" />
      <FieldRef ID="{bd94a837-82ab-4a8b-b7df-9978cd35f9ec}" />
      <FieldRef ID="{c05e3059-b1fc-4116-8f7d-1cfde24b96f4}" />
      <FieldRef ID="{32fb6f25-cf6e-4e9c-8244-137d017c9348}" />
      <FieldRef ID="{e42ca75d-f017-4eb7-91a6-236dfd71017a}" />
      <FieldRef ID="{EAA39077-D6AF-464e-8052-9001B4E99834}" />
    </FieldRefs>
  </ContentType>

</Elements>

所以,有3个CT,但是第一个没有部署。它没有隐藏,因为在检查SPWeb.AvailableContentTypes时 - 没有这样的CT可用。

  • CType的ID是唯一的。
  • 接收者类是公开的 可用。
  • 引用字段也是 可用。
  • 在新的网络应用程序上尝试此操作。

哦,可能有什么不对?

1 个答案:

答案 0 :(得分:1)

解决。

标记之间的<!-- -->条评论阻止了此内容类型的部署。