MSDN Visual Series: Creating a SharePoint Services Solution package

Source: Internet
Author: User
Tags visual studio

WSSV3 introduces a deployment mechanism called "solution package." This set of mechanisms can support the deployment of a solution as a whole unit. In this way, we can easily maintenance, testing and multiple re-use. We can deploy a crafted SharePoint solution package to a WSSV3 or MOSS server environment, including a stand-alone environment, or a small environment of a stand-alone Web server, or even an enterprise large server farm environment.

A solution package is a CAB file with a. wsp extension. It includes all the files to be deployed to the front-end server and some XML-formatted installation guidance files. SharePoint provides a rich infrastructure that enables simple deployment of solution packages in a server farm environment.

Each solution package must contain a header file named Manifest.xml. The file internally defines a solution element.

The following manifest.xml file creates a solution for list entry-level approval.

The following are the referenced contents:

<solution solutionid= "44be5f4a-d561-4981-a318-95abc706364a"
xmlns= "http://schemas.microsoft.com/sharepoint/" >
<FeatureManifests>
<featuremanifest location= "Itemauditing\feature.xml"/>
</FeatureManifests>
<TemplateFiles>
<templatefile location= "layouts\auditlogviewer.aspx"/>
<templatefile location= "layouts\itemaudit.aspx"/>
<templatefile location= "Layouts\auditlogworkbook.ashx"/>
</TemplateFiles>
<Assemblies>
<assembly deploymenttarget= "GlobalAssemblyCache"
location= "ItemAuditing.dll"/>
</Assemblies>
</Solution>

To generate a CAB file for a solution package

As the above example, the Manifest.xml file defines which files are part of the solution and should be deployed to the front-end Web server. Once we have defined the Manifest.xml file, we need to compile it with the other required files into a CAB file. You can use the command-line tool MAKECAB.EXE to make a CAB file. To use this tool, we also define a. ddf file to tell MAKECAB.EXE which files to include in the output CAB file. A. DDF example, named Cab.ddf, is used to generate the ITEMAUDITING.WSP solution package file for the entry-level approval solution above.

The following are the referenced contents:

. OPTION EXPLICIT; Generate errors
. Set cabinetnametemplate=itemauditing.wsp
. Set Diskdirectorytemplate=cdrom; All cabinets Go
. Set Compressiontype=mszip; All files compressed in cabinet files
. Set uniquefiles= "on"
. Set Cabinet=on
. Set Diskdirectory1=package

Solution\manifest.xml manifest.xml
Template\features\itemauditing\feature.xml Itemauditing\feature.xml
Template\features\itemauditing\elements.xml Itemauditing\elements.xml
Template\layouts\auditlogviewer.aspx layouts\auditlogviewer.aspx
Template\layouts\itemaudit.aspx layouts\itemaudit.aspx
Template\layouts\auditlogworkbook.ashx Layouts\auditlogworkbook.ashx
Bin\debug\itemauditing.dll ItemAuditing.dll
Run MAKECAB.EXE

Once you have created the. ddf file, we can run the following command to build the. WSP Solution package file.

The following are the referenced contents:

makecab/f SOLUTION\CAB.DDF

The solution package is ideal for a deployment file that is an enterprise-class or business-purpose. Can be created in the development environment in the form of Visual Studio projects. For all scenarios that need to be deployed outside of the development environment, they can be deployed in the form of solution packs. Solution packs also enable system administrators to perform scripted installations, a feature that is necessary for many enterprise-level IT organizations.



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.