You must call ZipFile.Save before calling any Extract method

I'm just migrating some code from 1.6 to 1.8.4.28 and I'm mystified by the BadStateException "You must call ZipFile.Save before calling any Extract method". So it is not possible to open a zip file readonly to extract a file?

If you are asking about the meaning of the exception, not because you have encountered it, but because you are reading the source code and want to understand what it means, be aware that the exception in question is thrown only when the zipfile has never
been saved, in other words when it is being created in memory.

Thanks. My root problem was reading the file, calling ZipFile.UpdateFile() on contained files (believing it was a no-op in this instance), neglecting to Save, and then trying to Extract, which results in the exception.

In conclusion, call Save before calling any Extract method on a new or updated ZipFile, as proven above.