zoukankan      html  css  js  c++  java
  • [转]Importing documents to Document Libraries with Mavention Import Document Library Contents(使用VS插件导出文档库内容定义)

    Recently I showed you how you can import Lists and their data into your SharePoint Project using the Mavention Import List Instance extension. As you can imagine supporting list data is only half of the story, so to complete it another extension became available. Find out how to import documents from Document Libraries into your SharePoint project using Mavention Import Document Library Contents.

    Last week we discussed how test data can help you test your SharePoint solutions and how you can import list data into your SharePoint Project for repeatable deployment. In my articles I covered only list data. However, as we all know, many SharePoint solutions include not only Lists but also Document Libraries and their data. So in order to be really productive you have to have a solution to cover both types of lists.

    List Items and Files in Document Libraries are not quite the same from the deployment point of view. In order to provision List Items to a List you have to use the ListInstance element with all the data specified in the Data element. On the other hand to provision a document to a Document Library you have to use a Module and include not only the metadata but also the document itself.

    Importing documents into SharePoint Project with Mavention Import Document Library Contents

    Mavention Import Document Library Contents is an extension for the Visual Studio 2010 SharePoint Developer Tools which is very similar to the Mavention Import List Instance extension I presented previously.

    After installing the extension a new option called Import Document Library Contents is added to the context menu of all Document Libraries in the Server Explorer.

    The ‘Import Document Library Contents’ menu option highlighted in the context menu of a Document Library in the Server Explorer

    After you click the option the contents of the selected Document Library will be imported to your SharePoint Project.

    Important: For this to work you have to have a SharePoint Project open and active in Visual Studio 2010.

    During the import process, the extension will create in the active SharePoint Project a new Module called after the selected Document Library. All files will be downloaded and included in the project structured just as they were in the selected Document Library.

    File tree imported into a SharePoint Project

    Together with downloading the files and including them in the active SharePoint Project, the Mavention Import Document Library Contents extension will update the Element Manifest so that all files can be provisioned to a Document Library.

    Element Manifest generated by Mavention Import Document Library Contents

    The only thing left for you to do is to add the imported Module to a Feature and once you activate it, all files from the imported Module should be provisioned to SharePoint.

    Tip: As you might have noticed the extension imports all files with all available properties. To keep the imported files clean you should remove all unnecessary files (such as List Forms) and properties. In my next post I will show you how you can modify the XSLT we used previously for cleaning List Instance data, to clean up unwanted document properties in a Module.

    And this is it! Using the Mavention Import Document Library Content extension you can import Documents from a Document Library into you SharePoint Project with a single mouse click.

    Download: Mavention Import Document Library Contents from Visual Studio Gallery.

  • 相关阅读:
    javascript学习笔记(一):基础、输出、注释、引用、变量、数据类型
    black-hole《XSS的原理分析与解剖》阅读笔记
    《xss跨站脚本剖析与防御》实验笔记
    XSS和CSRF的区别
    前端常用插件、工具类库汇总(下)
    前端常用插件、工具类库汇总(上)
    前端特效【第03期】|果汁混合效果-上
    玩转 React 【第03期】:邂逅 React 组件
    前端修炼の道 | 如何成为一名合格前端开发工程师?
    前端特效【第02期】|多功能提交按钮
  • 原文地址:https://www.cnblogs.com/kxlf/p/2234416.html
Copyright © 2011-2022 走看看