想用c#控制台写一个压缩解压小工具,直接用的System.IO.Compression库,然后在压缩这步出现了这个错误,明明我没有打开这个文件,但还是显示占用

internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("选择功能:1.解压 ;2.压缩 ");
FileHandle fileHandle = new FileHandle();
ConsoleKey Key=Console.ReadKey().Key;
if (Key == ConsoleKey.NumPad1)
{
Console.WriteLine();
if (Console.ReadKey(true).Key == ConsoleKey.Enter)
{
Console.WriteLine("\n"+"输入完整文件路径:");
string fullPath = Console.ReadLine();
fileHandle.FileToZip(fullPath);
}
}
else if(Console.ReadKey(true).Key == ConsoleKey.NumPad2)
{
Console.ReadKey();
if (Console.ReadKey(true).Key == ConsoleKey.Enter)
{
Console.WriteLine("\n" + "输入完整文件路径:");
string fullPath = Console.ReadLine();
fileHandle.ZipToFile(fullPath);
}
}
}
}
class FileHandle
{
public void FileToZip(string filepath)
{
string sourcePath = Path.GetDirectoryName(filepath);
//var stream =new FileStream(filepath,FileMode.Open,FileAccess.Read);
ZipFile.CreateFromDirectory(sourcePath, filepath+".zip");
}
}
错误是The process cannot access the file 'C:\MSI\1.txt.zip.zip' because it is being used by another process