Question

I need a little help with my vb.net programming as I am trying to unrar a RAR archive. I have the latest version from Chilkat for VS2012 in VB.NET, but it does not include a Chilkat.RAR method. I have tried using unrar.dll v3.9.3, but I cannot add the reference to my project because it is not compatible with VS2012. It says that the DLL is not a valid assembly and to check and make sure it is a valid assembly. I just need something that can unrar a RAR archive (no password method needed, and preferably only 1 file, not all files in a directory). This has to be compatible with the .net framework 4.0 AND/OR 4.5 AND MUST be able to be referenced in Microsoft Visual Studio 2012 Pro(VB.NET Environment).

Was it helpful?

Solution

Unrar.dll from RARLAB (http://www.rarlab.com/rar_add.htm) is a native library, so you cannot add it as a reference in a VB.NET project. You have to use Platform Invoke to consume its API, and that's what Chilkat's RAR library is based on.

If you want a managed library, you can check out http://sharpcompress.codeplex.com.

Sevenzipsharp.codeplex.com is based on 7-zip's native library, so it claims to support RAR format.

dotnetzip.codeplex.com is a managed ZIP library, which does not support RAR, and @Steve should not state it in the comment.

OTHER TIPS

SharpCompress is a compression library for .NET/Mono/Silverlight/WP7 that can unrar, un7zip, unzip, untar unbzip2 and ungzip with forward-only reading and file random access APIs. Write support for zip/tar/bzip2/gzip is implemented.

The major feature is support for non-seekable streams so large files can be processed on the fly (i.e. download stream).

Now on GitHub: https://github.com/adamhathcock/sharpcompress

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top