本文介绍了Ionic.Utils.Zip.ZipFile-未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
首先,我要感谢pimb2提出了一种自动更新应用程序的方法....
我正在尝试执行将自动将新编译的应用程序的文件复制到旧版本的操作...
但是我的问题是我得到的错误类型"Ionic.Utils.Zip.ZipFile"未定义
你能帮我吗?......?
下面给出的是我的代码.....
hi guys ,
First of all let me thank pimb2 for putting forth a method for auto update of applications.......
i was trying to do the same which automatically copy the files of the newly compiled application to the old version......
but my problem is i am getting the error Type ''Ionic.Utils.Zip.ZipFile'' is not defined
can u help me guys.......?
Given below is my code .....
Public Function CheckForUpdates(ByVal Location As String)
Dim temppath = IIf(Environ$("tmp") <> "", Environ$("tmp"), Environ$("temp")) 'Get temp path
Dim rand = Int((10000 - 1 + 1) * Rnd()) + 1 'Generate random number to have an unique filename
Dim dldname = Path.GetFileName("N:\Deployment\PYRAMID") 'Get filename of file to be downloaded
DownloadFileWithProgress("N:\Deployment\PYRAMID", temppath.ToString + "\" + rand.ToString + dldname) 'Download the file
Dim a = New Ionic.Utils.Zip.ZipFile(temppath.ToString + "\" + rand.ToString + dldname) 'Create new var with zip file
For Each zipfile As Ionic.Utils.Zip.ZipEntry In a 'for each loop for every file in zip
If My.Computer.FileSystem.FileExists(vars_unzipdir + "\" + zipfile.PYRAMID) Then 'If this file already exist, delete it
My.Computer.FileSystem.DeleteFile(vars_unzipdir + "\" + zipfile.PYRAMID)
End If
zipfile.Extract(vars_unzipdir) 'Extract this file
Next
Return Nothing
End Function
推荐答案
这篇关于Ionic.Utils.Zip.ZipFile-未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!