lundi 22 mai 2017

How to use reflection on zipped content without extracting

I am able to retrieve list of file inside a zip file by using :

 var files = ZipFile.Open(_buildPath, ZipArchiveMode.Read).
             Entries.Select(x => x.Name).ToArray();

But Need to get the version info of file(s):

var randomEntry= ZipFile.Open(_buildPath, ZipArchiveMode.Read).
     Entries.Where(x => x.Name == "Random.EXE").FirstOrDefault(); 
     FileVersionInfo.GetVersionInfo(randomEntry);

Is there a way I can use reflection on a zip file content.





Aucun commentaire:

Enregistrer un commentaire