This option will upgrade first the database file format and then defragment it. You need to specify a folder where the temporary data for this process is stored.
DefragmentConfig config = new DefragmentConfig("database.db4o");
config.UpgradeFile(Environment.GetEnvironmentVariable("TEMP"));
Defragment.Defrag(config);
Dim config As New DefragmentConfig("database.db4o")
config.UpgradeFile(Environment.GetEnvironmentVariable("TEMP"))
Defragment.Defrag(config)