Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Reference SevenZipSharp.dll from you .NET project and make sure you have the 7z DLL copied to the target output directory as a post-build event. Since 7z.dll is not a .NET assembly your .NET project cannot reference it directly.</p> <p>There are two typical explanations for "Can not load 7-zip library or internal COM error! Message: failed to load library":</p> <ol> <li><p>The obvious is that the 7z DLL can't be found. In that case call SevenZipCompressor/SevenZipExtractor.SetLibraryPath() with the full path of the DLL before making any related SevenZipSharp calls. Relative paths should work as well but try the absolute in case some code changed the current directory of the process. One strategy to get the absolute path is to use the path of the executing assembly, see below for an example.</p></li> <li><p>The architecture of the DLL being referenced doesn't match the current process. For example your .NET assembly is running x64 but you reference a 32-bit version of 7z.dll. In that case you would need to reference 7z64.dll. Download the 7-Zip DLL binaries from SevenZipSharp's <a href="http://sevenzipsharp.codeplex.com/releases/view/51254">release</a> to ensure there are no other mismatch issues and make sure you're using the correct version.</p></li> </ol> <p>Here is an example how to set the absolute path of the 7z.dll if it's in the same directory as the assembly using it:</p> <pre><code>SevenZip.SevenZipCompressor.SetLibraryPath( Path.Combine( Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "7z.dll")); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload