Manual packaging of SharePoint Solutions

Source: Internet
Author: User

Introduction: when using Sharepoint, we often need to package a solution. Let's introduce the manual deployment of the SharePoint solution. I think, the solution is a very good function in Sharepoint, which is very convenient to deploy and use. In particular, with the use of feature, you can enable and disable the corresponding function, without talking about it, start packaging and deploying our solutions.

Preparations-[makecab command,. DDF file, and manifest. xml]. Learn about the above three items. This is necessary for manual packaging solutions.

· MakecabCommand

Makecab is a command provided by Microsoft to create a cab file. The file format used for this command is. DDF, We can enter CMD in the running process, and then enter makecab and press Enter. We can see the command usage and parameters (1). We can manually package the solution, that is, use the makecab command for packaging.

(Figure 1)

· DDFFile

Next we will introduce the. DDF file. What we mainly know is the file format. Here we will give you an online example. Next, we will give you a brief introduction to it. As shown in the following figure. DDF file, we will put manifest. the XML and manifest1.xml files are packaged into the WSP package. Of course, this is a simple example. What we need when packaging is not such a file, but a file like DLL and ascx.

This is the case. DDF file. The WSP file structure after packaging is that there is a manifest under the root directory. XML file, and the test folder contains the manifest1.xml file. You can manually create 12/bin/template and other similar folders to package them to the corresponding location.

. Option explicit

. Set cabinetnametemplate = mytest. WSP // solution name

. Set diskdirectorytemplate = CDROM

. Set compressiontype = mszip // Compression Method

. Set uniquefiles = on

. Set cabinet = on

. Set diskdirectory1 = // directory

Manifest1.xml test \ manifest1.xml // The location following the name of the current directory file in Solution

Manifest. xml

· Manifest. xml

This file is a very important component of the packaging solution. For your reference, this file is used to place the files in the solution package in the specified location. In particular, the value of solutionid is a unique value and cannot be repeated. It must be regenerated each time.

<? XML version = "1.0"?>

<Solution solutionid = "505e68e7-55ea-4b66-b5d3-6c41e4cc7296" xmlns = "http://schemas.microsoft.com/sharepoint/">

<Assemblies>

<Assembly deploymenttarget = "webapplication" location = "*. dll">

<Classresources>

<Classresource filename = "*. ascx" location = "*. ascx"> </classresource>

<Classresource filename = "*. ascx" location = "*. ascx"> </classresource>

</Classresources>

</Assembly>

<Assembly deploymenttarget = "globalassemblycache" location = "*. dll">

<Safecontrols>

<Safecontrol Assembly = "" namespace = "" typename = "*" Safe = "true"/>

</Safecontrols>

</Assembly>

</Assemblies>

<Templatefiles>

<Templatefile location = "controltemplates \ *. ascx"/>

<Templatefile location = "Images \ *. jpg"/>

</Templatefiles>

<Rootfiles>

<Rootfile location = "ISAPI \ *. asmx"/>

<Rootfile location = "template \ layouts \ *. asmx"/>

<Rootfile location = "template \ layouts \ 2052 \ MCS \ flashnews \ *. js"/>

</Rootfiles>

</Solution>

In the packaging process, you first need to manually create a hierarchical Directory, which is similar to the directory method under 12. Then, place the corresponding file in the corresponding location and write the DDF file (the location of this file, is to specify the files to be packaged to the location in the solution), and then writeManifest. xmlFile, specify the corresponding file, the location to the server farm after deployment. Then, Enter cmd in the running process, and then enter the makecab command. makecab/F sample. DDF can package the WSP package in a moment.

Note: This is a note for you to learn how to manually package the files. For details about makecab files, refer to Baidu encyclopedia. In fact, the packaging solution is far from so troublesome. However, I still want to know the packaging process. It is also a learning experience.

**************************************** **************************************

Author: Yu

Source: http://www.cnblogs.com/jianyus

The copyright of this article is shared by Yu and the blog Park. You are welcome to reprint it, but please indicate the source.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.