2009-10-20 46 views
0

我有具有定義多種內容類型下列清單文件功能:部署3個CONTENTTYPES採用1個功能 - 只有2個被部署

<?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是唯一的。
  • 接收器類是公開的 可用。
  • 引用字段也是 可用。
  • 在新的web應用程序上嘗試此操作。

噢,有什麼可能是錯的?

+0

您是否在部署和激活功能時檢查了跟蹤日誌? 很多信息要過濾,但SharePoint告訴你一些東西。 我會檢查這條路線。 XML註釋與ctype無關,它們只是Eventhandlers的一個問題。 – Henrik 2009-10-21 06:38:13

回答

1

已解決。

那些<!-- -->標記之間的註釋阻止了此內容類型的部署。

+0

這些評論標籤是EventReceivers內部的問題 - 但不在CType的xml定義中。 – Henrik 2009-10-21 06:39:55

+0

那麼,在我的情況下,他們是內容types.xml定義中的問題。因爲,當我刪除它們和回收應用程序池 - 內容類型立即顯示。 – 2009-10-21 07:33:22