使用SevenZipSharp出现“Can not load 7-zip library or internal COM error! Message: DLL file does not exist.”的解决方案
如果你是从nuget上下载安装的SevenZipSharp库,当你写好相应代码,兴冲冲的启动程序进行测试时,以下画面会让你受到当头一棒:

究其原因,是因为SevenZipSharp只是native 7z库的C# Wrap,所以你要让程序能够正常运行,还需要有7z的运行时库(但诡异的是SevenZipSharp既没有自己附带,也没有写入依赖项)。
可以打开nuget,下载安装7z或7z.Libs,设置7z.dll为始终拷贝。然后再次启动程序。
如果依然出现这个错误,说明SevenZipSharp没有能够自动找到7z.dll,这时我们可以手动设置其路径,如:
if (IntPtr.Size == )
{
SevenZipCompressor.SetLibraryPath(@"7z-x86.dll");
}
else
{
SevenZipCompressor.SetLibraryPath(@"7z-x64.dll");
}
解压的设置同理。
使用SevenZipSharp出现“Can not load 7-zip library or internal COM error! Message: DLL file does not exist.”的解决方案的更多相关文章
- SevenZip.SevenZipLibraryException: Can not load 7-zip library or internal COM error! Message: failed to load library.
SevenZip.SevenZipLibraryException: Can not load 7-zip library or internal COM error! Message: failed ...
- eclipse安装提示错误:Failed to load JNI shared library "D:\jdk1.7\client\jvm.dll"
错误截图如下 原因是jdk32位,eclipse64位导致,修改jdk版本为64位或者修改ecipse版本为32位即可.
- 【转】emulator: ERROR: Could not load OpenGLES emulation library: lib64OpenglRender.so
[转]emulator: ERROR: Could not load OpenGLES emulation library: lib64OpenglRender.so ./emulator64-arm ...
- Unable to load R3 module D:\Program Files\Oracle\VirtualBox/VBoxDD.DLL (VBoxDD): GetLastError=1790 (VERR_UNRESOLVED_ERROR).
Unable to load R3 module D:\Program Files\Oracle\VirtualBox/VBoxDD.DLL (VBoxDD): GetLastError=1790 ( ...
- 网站部署后Parser Error Message: Could not load type 的解决方案
asp.net 的Webproject 项目是在64bit机上开发,默认选项发布后,部署到32bit的服务器上,出现Parser Error Message: Could not load type的 ...
- 关于怎样解决eclipse打开时出现的Failed to load the JNIshared library亲测有效
之前一直可以正常使用eclipse但是当我装了Oracle后打开后就出现了Failed to load the JNIshared library(下面还出现了一个jvm.dll的文件路径),当时就蒙 ...
- error opening trace file: No such file or directory (2) ,can't load transform_config.xml
出现这个错误:error opening trace file: No such file or directory (2) ,can't load transform_config.xml 是因为没 ...
- Failed to load the JNI library "E:\JDK6.0\bin\client\jvm.dll"
在打开Eclipse是错误提示:Failed to load the JNI library "E:\JDK6.0\bin\client\jvm.dll" 如图1所示 图1 遇到这 ...
- win10 anaconda安装后使用报错“Original error was: DLL load failed: 找不到指定的模块”
报错:Original error was: DLL load failed: 找不到指定的模块. 环境变量需要添加3个 然后就okay了.
随机推荐
- 远程线程注入方法CreateRemoteThread
最近在整理学习Windows注入方面的知识,这个远程注入前面早写过,现在看看人家博客的理解整理,整理, 需要源码的可以到我的github上下载. 链接是 https://github.com/Ars ...
- 【PHP系列】PHP组件详解
缘起 枫爷之前做过几年的PHP的研发,大部分都是在开源框架的引导下,编写代码.现在依然,本能的会去让我使用某个PHP框架开发PHP应用,也是因为懒吧,没有好好的去研究研究除了框架之外的一些东西. 今天 ...
- JSP中三种弹出对话框的用法《转》
对话框有三种 1:只是提醒,不能对脚本产生任何改变: 2:一般用于确认,返回 true 或者 false ,所以可以轻松用于 if...else...判断 3: 一个带输入的对话框,可以返回用户填入的 ...
- angular : $eval & $timeout
$digest: function() { var watch, value, last, watchers, length, dirty, ttl = TTL, next, current, tar ...
- CSS下拉菜单
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...
- 使用Spring构建RMI服务器和客户端
上一篇文章我们实用JDK原生API构造了简单RMI应用,本篇将实用Spring框架来构造RMI的应用,实用Spring你会体验到简单,不需要那么多的条条框框,因为Spring给你做了很多封装. 项目构 ...
- C/C++ char数组存储字符串内存地址
问题描述: #include <stdio.h> int main(void) { //program 6.3 Arrays of strings ][]; ;i<;++i){ ;j ...
- [.net 面向对象程序设计深入](13)实战设计模式——设计模式使用场景及原则
[.net 面向对象程序设计深入](13)实战设计模式——设计模式使用场景及原则 1,什么是设计模式? 设计模式(Design pattern)是一套被反复使用.多数人知晓的.经过分类编目的.代码设计 ...
- linux 部署jenkins
1.安装jdk,配置jdk路径,python路径 (当前用户的配置文件) vi .bash_profile export JAVA_HOME=$HOME/local/jdk1.8.0_111 exp ...
- HDFS Namenode启动过程
文章作者:luxianghao 文章来源:http://www.cnblogs.com/luxianghao/p/6564032.html 转载请注明,谢谢合作. 免责声明:文章内容仅代表个人观点, ...