zoukankan      html  css  js  c++  java
  • 使用 WSPBuilder 创建List Instance WSP 包

    1. Project structure
    2. 

     

      2. Feature xml

         <?xml version="1.0" encoding="utf-8"?>

       <Feature  Id="C257B7BE-D5F3-4b9d-B146-5F13F2E96AE9"

              Title="CreateAnnouncementList"

              Description="Description for CreateAnnouncementList"

              Version="12.0.0.0"

              Hidden="FALSE"

              Scope="Web"

              DefaultResourceFile="core"

              xmlns="http://schemas.microsoft.com/sharepoint/">

        <ElementManifests>

          <ElementManifest Location="elements.xml"/>

          <ElementFile Location="AnnouncementsList/schema.xml"/>

        </ElementManifests>

       </Feature>

      3. Elements xml

     <?xml version="1.0" encoding="utf-8" ?>

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">

      <ListTemplate

        FeatureId="C257B7BE-D5F3-4b9d-B146-5F13F2E96AE9"

        Name="AnnouncementsList"

        DisplayName="AnnouncementsList"

        Description=""

        BaseType="0"

        Type="100"

        OnQuickLaunch="TRUE"

        SecurityBits="11"

        Sequence="410"

        Image="/_layouts/images/itgen.gif" />

      <ListInstance

        FeatureId="C257B7BE-D5F3-4b9d-B146-5F13F2E96AE9"

        Title="AnnouncementsList"

        Url="Lists/AnnouncementsList"

        Description="AnnouncementsList"

        TemplateType="100" />

      </Elements>

      4 . Note:

    Element xml 文件中的ListTemplate 的Name 的名称必须和包含Schema.xml的文件夹名称保持一致。否则在激活Feature时会报错。错误信息如下:

    Exception from HRESULT: 0x81070201   at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt)
       at Microsoft.SharePoint.Library.SPRequest.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt)

    ListTemplate和ListInstance文件的FeatureId 与Feature 文件保持一致。

  • 相关阅读:
    两种无限递归菜单
    python导出项目所有依赖库,在新环境中安装所有依赖库
    python3.6中安装Crypto模块
    在Django中settings文件内,配置MySQL和Redis
    Django继承AbstractUser新建User Model时出现fields.E304错误
    django_orm操作MySQL数据库,批量插入数据
    在用脚手架搭建vue项目时,运行vue报错
    django命令行运行失败
    redis pipline 操作
    tcpdump 与 MySQL sniffer 【转】
  • 原文地址:https://www.cnblogs.com/dexter2003/p/2075394.html
Copyright © 2011-2022 走看看