I'm trying to set a password for a zip file using SharpZipLib library with .Net Core.
I have followed this example in order to set a password, however once the zip file has been created, the files are in there and the zip file is create, however there is no password.
// Create a password for the Zipfolder
// https://github.com/icsharpcode/SharpZipLib/wiki/Zip-Samples
using (ICSharpCode.SharpZipLib.Zip.ZipFile ZipFile = new ICSharpCode.SharpZipLib.Zip.ZipFile(Path.GetFileName(destinationPath)))
{
ZipFile.Password = "foo";
ZipFile.Add(destinationPath, "");
}