Thursday, January 15, 2009

STSDEV solution filesize limitation

STSDEV uses the MakeCab executable to build its .cab/.wsp solution files. Unfortunately, MakeCab has some holdover default settings from the dark ages of computing, one of which is its generated filesize maximum, which is set to 1.44Mb. This hasn't been a problem for me, as most packages tend to be fairly lightweight. However, when deploying a solution with lots of binary resources (a masterpage or layouts feature, for example), you will need to tell STSDEV and MakeCab that you want to build a bigger file. Deploying without making the adjustments will result in an incredibly unhelpful error from STSADM:

The file manifest.xml does not exist in the solution package.

A blogger at PointBridge was nice enough to document this here, but the fix is fairly simple so I've added the code below.

To fix your solution packages, you'll need the source for STSDEV. Open the file
\STSDev\Core\Builders\DeploymentFiles\CabDdfBuilder.cs, and enter the following at the end of the .ddf settings section, and recompile:

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");

Packages generated with your new STSDEV build will no longer be truncated.

1 comment:

Paul said...

Good post. We should probably post that on the STSDEV issue tracker on CodePlex.