Skip to main content

Cloud

WSP File Size Limitation in STSDEV

By default, MAKECAB limits the size of individual CAB files to 1.44MB (the capacity of a floppy disk). When the total size of your CAB exceeds this limit, MAKECAB will create additional files as necessary to accomodate all of your data.
If you use MAKECAB to produce WSP files for deploying SharePoint solutions and you try to deploy a WSP that has been split into multiple files, STSADM will give you an error message stating "The file manifest.xml does not exist in the solution package." This error is your only indication that the WSP you are trying to deploy is incomplete.
As Tom Meskens points out in his blog, you can easily modify the DDF to override this behavior so that the size of your WSP can exceed the default limit. This blog gives additional details about the behavior and how to override the settings.
Modifying the DDF is a problem, however, when you are using a tool such as STSDEV that auto-generates the file for you. Fortunately, STSDEV is an opensource project and the source code is available on Codeplex. If you download the source from Codeplex, you can easilty modify STSDEV to create CAB files that are not constrained by the default size limit.
To fix STSDEV, open the file STSDevCoreBuildersDeploymentFilesCabDdfBuilder.cs and modify the Create method by inserting the highlighted code as shown below:

public static void Create(string FilePath) {

StreamWriter writer = new StreamWriter(FilePath);

writer.WriteLine("; Generated by STSDEV at " + DateTime.Now.ToString());

writer.WriteLine();

writer.WriteLine(".OPTION EXPLICIT");

writer.WriteLine(".Set CabinetNameTemplate=" + SolutionBuilder.SolutionName + ".wsp");

writer.WriteLine(".set DiskDirectoryTemplate=CDROM");

writer.WriteLine(".Set CompressionType=MSZIP");

writer.WriteLine(".Set UniqueFiles=off");

writer.WriteLine(".Set Cabinet=on");

writer.WriteLine(".Set DiskDirectory1=" + Globals.DeploymentFilesFolder);

writer.WriteLine(".Set CabinetFileCountThreshold=0 ");

writer.WriteLine(".Set FolderFileCountThreshold=0");

writer.WriteLine(".Set FolderSizeThreshold=0");

writer.WriteLine(".Set MaxCabinetSize=0");

writer.WriteLine(".Set MaxDiskFileCount=0");

writer.WriteLine(".Set MaxDiskSize=0");

writer.WriteLine();

After making this change, you can compile a new stsdev.exe and use it to replace the old executable.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Jeff Monnette

More from this Author

Follow Us