I had a piece of code that working without issue on Windows XP
. Not our company has migrated to windows 7
and the software stopped working. De code itself opens an zip-file and extracts the content. Following it reads the content.
Dim tempzip As String = "C:\ some very long path\bin\Debug\lib.zip"
Dim tempdir As String = IO.Path.Combine(IO.Path.GetTempPath, Guid.NewGuid.ToString)
Using zip1 As Ionic.Zip.ZipFile = Ionic.Zip.ZipFile.Read(tempzip)
Dim e As Ionic.Zip.ZipEntry
For Each e In zip1
e.Extract(tempdir, Ionic.Zip.ExtractExistingFileAction.OverwriteSilently)
Next
End Using
PropertiesAssembly = System.Reflection.Assembly.LoadFrom(IO.Path.Combine(tempdir, "some dll in zip-file"))
The error occurs at the e.Extract
. He could apparently not find the zip-file. The exception thrown is your standard Could not find file or part of file...
The Zip-file does exist at the specified location and the needed assembly is present in the zip-file. The code has not been altered yet. This was merely a test to check the working.
Question: Is there a difference between windows 7 & windows xp in file-handling? if not, what might the cause of this strange behavior