I have an SSIS project with me, I can work as is. But, when I try to edit it, an error message appears
The name "zipfile" does not exist in the current context
without editing, it works great
Error code:
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; }
How can i solve this?
c # zipfile ssis
vignesh
source share