Disable Compression has no effect

description

I suspect the disable compression checkbox has no effect. My reasons being:

export fails with OutOfMemoryException while trying to compress file.
the export log file always says compressing files, no matter what the filecompression setting is.
The resulting cab files have the same size within a dozen byte under both settings.

I think I found the bug reading the source code, but I cannot build the project right now so I haven't been able to confirm.

In WizardExportSettings::CollectExportSettings the flag in the xml is read and set to the exportSettings as it should.
But then, in the next block commented "set other properties that aren't tied to values in XML..", exportSettings.FileCompression is hard coded to true, which would overwrite the setting from the xml file.

file attachments

No files are attached

Closed
by

comments

I recompiled my local version with the fix, and now it works. The logic when reading import settings also needs to be modified in a similar way.

I used the command line version and modified the settings xml by hand. For the wizard UI to support importing uncompressed files there needs to be a checkbox to disable compression during import, as well as a way to select an import directory (not an import
base file) where the exported files are to be found.

// set other properties which aren't tied to values in XML..
exportSettings.TestRun = false;
exportSettings.OverwriteExistingDataFile = true;
exportSettings.LogFilePath = string.Format("{0}\\{1}.Export.log",
exportSettings.FileLocation, exportSettings.BaseFileName);
//exportSettings.FileCompression = true; /* This is the line that hard codes the compression */

I actually hard coded the file compression to false because that's what I needed.

By the way, I had some trouble removing COB.SharePoint.Utilities.DeploymentWizard.Core.dll from the GAC because it is linked to an installer. So you have to uninstall SPDeploymentWizard and put your build somewhere else.