Introduction: In the use of SharePoint, we often need to do is to package the solution, we introduce the next SharePoint Solution manual deployment, I think, the solution is a very good SharePoint features, deployment and use is quite convenient, Especially with the use of feature, the corresponding function can be turned on and off, nonsense not to say, start our solution package deployment.
Pre-Preparation-[makecab command,. ddf format file, Manifest.xml], understand the above three items, this for the manual packaging solution, is very necessary.
· MakeCab command
MakeCab is a Microsoft-supplied command to make a CAB file, The file format used for this command is. DDF, we can enter CMD in the run, then enter MakeCab carriage return, you can see the command usage and parameters (Figure 1), we package the solution manually, that is, use the MakeCab command to package.
(Figure 1)
DDF File
Then introduce the following. ddf file, we mainly understand the format of the file, to give you an online search for examples, and then briefly introduced, we will have some understanding. As shown in the. ddf file below, we will package the manifest.xml and manifest1.xml two files into the WSP package, which, of course, is a simple example of what we need when we package, not the files like DLLs and Ascx.
Such a. ddf file, packaged after the WSP file structure, that is, there is a manifest.xml file under the root directory, and there are manifest1.xml files under the test folder, we can manually create similar folders such as 12/bin/template, Can be packaged in the appropriate location.
.OPTION EXPLICIT
.Set CabinetNameTemplate=mytest.wsp//解决方案名称
.set DiskDirectoryTemplate=CDROM
.Set CompressionType=MSZIP//压缩方式
.Set UniqueFiles=on
.Set Cabinet=on
.Set DiskDirectory1= //目录
manifest1.xml test\manifest1.xml//前面的为当前目录文件名称 后面的在解决方案中的位置
manifest.xml
manifest.xml
This file, is a packaging solution of a very important file composition, to give you a reference example, the role of the file is to put the solution package inside the file, to the designated location. In particular, SolutionID this value is a unique value that cannot be repeated each time you want to regenerate.
<?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>
Packaging process, the first is to manually build a hierarchical directory, which is built like 12 of the directory, and then put the corresponding file to the appropriate location, write DDF file (the location of this file, is to specify the packaging of those files, packaging to the location of the solution) , then write the manifest.xml file, specify the appropriate file, and then deploy to the server farm location. Then, enter CMD in the run, then enter MakeCab command, makecab/f sample.ddf Wait a moment to pack the WSP package.
Note: This is their own learning manual packaging notes, MakeCab file can refer to the introduction of Baidu Encyclopedia, in fact, now packaging solution is far from so troublesome, however, I still want to understand the packaging process, but also a learning experience.
******************************************************************************
Author: Lin Yu
Source: Http://www.cnblogs.com/jianyus
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/sharepoint/