Add a reference & 'using' statement for System.IO.Compression.FileSystem
ref :
ZipArchive Constructor (System.IO.Compression) | Microsoft Docs[
^] - using the 'stream constructor' gets-around having to add an entire directory
using (FileStream fs = new FileStream(@"drive:\path\file.zip",FileMode.Create))
using (ZipArchive zArchive = new ZipArchive(fs, ZipArchiveMode.Create))
{
zArchive.CreateEntryFromFile(@"drive:\path\xml-file.xml", "xml-file.xml");
}