Just an update on this for anyone else who stumbles across this question.
Starting in .NET 4.5 you are able to compress a directory using System.IO.Compression
into a zip file. You have to add System.IO.Compression.FileSystem
as a reference as it is not referenced by default. Then you can write:
System.IO.Compression.ZipFile.CreateFromDirectory(dirPath, zipFile);
The only potential problem is that this assembly is not available for Windows Store Apps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…