Mam projekt SSIS ze mną, mogę biegać tak jak jest. Ale gdy próbuję edytować to pokazuje błądNazwa "zipfile" nie istnieje w obecnym kontekście
Nazwa 'zipfile' nie istnieje w bieżącym kontekście
z zewnątrz edit działa poprawnie kod
Error:
public void Main()
{
// TODO: Add your code here
string moduleName = Dts.Variables["User::ModuleName"].Value.ToString();
string s = Dts.Variables["User::ZipFileLocation"].Value.ToString().TrimEnd('\\') + "\\" + moduleName + "\\" + moduleName + "_" + DateTime.Now.ToString("ddMMyyyy");
// TODO: Add your code here
string startPath = s;
string zipPath = s + ".zip";
try
{
File.Delete(zipPath);
ZipFile.CreateFromDirectory(startPath, zipPath);
}
catch (Exception e)
{
}
Dts.TaskResult = (int)ScriptResults.Success;
}
Jak mogę to rozwiązać?
Gdzie jest kod –
Prawdopodobnie tylko odwoływać System.IO.Compression dziwo trzeba odwoływać System.IO.Compression.FileSystem też? –