Asad Hasnaini Asad Hasnaini - 4 months ago 55
C# Question

How to unrar an archive in dotnet core?

Is there a library builtin that could be used to extract

files in dotnet core? I found something to extract zip files, but nothing for
files. Used 7zip in 4.5


The ZipFile class from System.IO.Compression supports both .zip and .rar archives.

You can open an archive like this:

using(ZipArchive za = ZipFile.OpenRead(strPath))  
    //do something with `za.Entries` or with other properties