使用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了.
随机推荐
- 获取CPU和内存呢信息
#include <stdio.h> #include <stdlib.h> #include <winsock.h> #pragma comment(lib, & ...
- idea常用设置
Idea删除当前行的快捷键是Ctrl+y,复制当前行的快捷键是Ctrl+d,和eclipse的习惯不一样.虽然可以一键把idea的快捷键映射成eclipse,但是这样做代价太大,如果这样,idea的官 ...
- nodejs 代码设计模式1:同步函数变异步
同步函数变异步 1 问题: 1.1 碰到需要调用你刚正在创建的对像. function createServer(data, cb) { data.num = 1; cb(); return data ...
- Python脚本收集腾讯云CDN日志,并入ELK日志分析
负责搭建公司日志分析,一直想把CDN日志也放入到日志分析,前些日志终于达成所愿,现在贴出具体做法: 1.收集日志 腾讯云CDN日志一般一小时刷新一次,也就是说当前只能下载一小时之前的日志数据,但据本人 ...
- 【转】Java通过IText导出word和pdf
原帖地址:http://blog.csdn.net/zwx19921215/article/details/34439851 最近做的项目中需要用到把Highcharts图表导出word和pdf的功能 ...
- 每天一个linux命令(29)--Linux chmod命令
chmod 命令用于改变Linux 系统文件或目录的访问权限.用它控制文件或目录的访问权限.该命令有两种用法.一种是包含字母和操作符表达式的文字设定法:另一种是包含数字的数字设定法. Linux系统中 ...
- 从 http 升级到 https 过程中遇到的一些问题
Apple 2017年1月1号起要求Appstore 上线的应用都必须使用 https 加密请求协议,在二月份又改为建议 从 http 升级为 https 协议,此为背景. 公司做的APP同时在App ...
- 第25篇 jQuer快速学习(上)---选择器和DOM操作
这个文章经历的时间比较长,不是因为jQuery比较难,而是东西比较多,真心是个体力活.所以本来想把jQuery做成一篇去写,但由于写的时候发现jQuery发现写成一篇的话过于长,对于阅读起来也不是一个 ...
- mysql之连接localhost与127.0.0.1的区别
引言 在聊天群里看到有人提到 mysql 中 localhost 和 127.0.0.1 的区别,这个之前并没有仔细考虑过.现在来学习下. localhost 与 127.0.0.1 区别 local ...
- 阿里云开发之OSS数据迁移
最近由于项目需求,需要将一个aliyun账号下的oss数据导入到两一个aliyun账号下的oss,经过一番坎坷,最终搞定. 1.查看oss数据迁移官方文档,我是在本地windows电脑上进行操作的,先 ...