This project is read-only.

Disable Compression has no effect


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.


julmas wrote Sep 1, 2009 at 12:32 PM

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.

animalmother wrote Sep 25, 2009 at 2:25 PM

Same thing here. Guess I will have to download the source code and make the fix.

There wouldn't be a bug if somebody actually tested the checkbox...

animalmother wrote Sep 25, 2009 at 4:21 PM

Here's the code to change:

In WizardDeployment.cs of the SPContentDeploymentWizard project (COB.SharePoint.Utilities.DeploymentWizard.Core.dll)

internal static WizardExportSettings CollectExportSettings(XmlTextReader exportSettingsXml)
        // 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.

animalmother wrote Sep 28, 2009 at 4:08 PM

Jeez, now I want to import the uncompressed backup and I can't.

Don't get me wrong, I love this tool, great work so far, but next time when you add a feature, how about testing it and completing it before releasing it? :)

wrote Feb 22, 2013 at 12:44 AM