none
部署列表模板报Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)错,GUID通过VS工具生成 RRS feed

  • 问题

  • 按照示例:创建自定义列表定义 一步一步的做,最后部署的时候报错:Error occurred in deployment step 'Activate Features':Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

    我的GUID是通过VS工具生成的.

    字段定义文件如下:

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <Field ID="{71D05D8F-CE3C-4F53-A47E-CA2ED84D105D}"  Type="Choice" Name="FavoriteColor"  DisplayName="Favorite Color" ShowInDisplayForm="True" ShowInNewForm="True" ShowInEditForm="True">
        <CHOICES>
          <CHOICE>Red</CHOICE>
          <CHOICE>Green</CHOICE>
          <CHOICE>Bule</CHOICE>
          <CHOICE>Purple</CHOICE>
          <CHOICE>Magenta</CHOICE>
        </CHOICES>
      </Field>
      </Elements>
    

    内容类型文件如下:

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <!-- Parent ContentType: 项目 (0x01) -->
      <ContentType ID="0x01004bcd80b7efe8473e9ced0942a02a6165"
                   Name="ListDefine - FavoriteColorContentType"
                   Group="Custom Content Types"
                   Description="My Content Type"
                   Inherits="TRUE"
                   Version="0">
        <FieldRefs>
          <FieldRef ID="{71D05D8F-CE3C-4F53-A47E-CA2ED84D105D}" Name="FavoriteColor"/>
        </FieldRefs>
      </ContentType>
    </Elements>
    

    schema.xml文件如下:

    <?xml version="1.0" encoding="utf-8"?>
    <List xmlns:ows="Microsoft SharePoint" Title="ListDefine - FavoriteColorListDefinitionZZ" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/ListDefine-FavoriteColorListDefinition" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
      <MetaData>
        <ContentTypes>
          <ContentType ID="0x01004bcd80b7efe8473e9ced0942a02a6165" Name="ListDefine - FavoriteColorContentType" Group="Custom Content TypesXX" Description="My Content Type" Inherits="TRUE" Version="0">
            <FieldRefs>
              <FieldRef ID="FieldId" Name="FavoriteColor" />
            </FieldRefs>
          </ContentType>
        </ContentTypes>
        <Fields>
        </Fields>
        <Views>
          <View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
            <Toolbar Type="Standard" />
            <XslLink Default="TRUE">main.xsl</XslLink>
            <RowLimit Paged="TRUE">30</RowLimit>
            <ViewFields>
              <FieldRef Name="LinkTitleNoMenu">
              </FieldRef>
              <FieldRef  ID="{71D05D8F-CE3C-4F53-A47E-CA2ED84D105D}" Name="FavoriteColor"></FieldRef>
            </ViewFields>
            <Query>
              <OrderBy>
                <FieldRef Name="Modified" Ascending="FALSE">
                </FieldRef>
              </OrderBy>
            </Query>
            <ParameterBindings>
              <ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
              <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
              <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" />
            </ParameterBindings>
          </View>
          <View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
            <Toolbar Type="Standard" />
            <XslLink Default="TRUE">main.xsl</XslLink>
            <RowLimit Paged="TRUE">30</RowLimit>
            <ViewFields>
              <FieldRef Name="Attachments">
              </FieldRef>
              <FieldRef Name="LinkTitle">
              </FieldRef>
              <FieldRef ID="{71D05D8F-CE3C-4F53-A47E-CA2ED84D105D}" Name="FavoriteColor"></FieldRef>
            </ViewFields>
            <Query>
              <OrderBy>
                <FieldRef Name="ID">
                </FieldRef>
              </OrderBy>
            </Query>
            <ParameterBindings>
              <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
              <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
            </ParameterBindings>
          </View>
        </Views>
        <Forms>
          <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
          <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
          <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
        </Forms>
      </MetaData>
    </List>

    请帮忙看看是哪里出了问题?

    2012年8月21日 6:20

答案