CurlSharp
https://github.com/masroore/CurlSharp
clone版本库之后,在本地使用,会遇到找不到dll的情况
编译EasyGet项目之后,进行调试,会提示
System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
在 CurlSharp.NativeMethods.curl_global_init(Int32 flags)
在 CurlSharp.Curl.GlobalInit(CurlInitFlag flags) 位置 D:\SourceCode\GitHub\CurlSharp\CurlSharp\Curl.cs:行号 75
在 EasyGet.EasyGet.Main(String[] args) 位置 D:\SourceCode\GitHub\CurlSharp\Samples\EasyGet\EasyGet.cs:行号 17
问题在于:
编译CurlSharp项目的时候,生成的CurlSharp.dll自动复制到了EasyGet项目的生成路径
但是libcurl.dll这些有依赖关系的库,没有一同拷贝过去
处理方法:
1.CurlSharp项目独立编译,并将编译后的dll,直接复制到EasyGet项目的生成路径[包括依赖的库]
2.然后EasyGet项目,直接将生成路径下的CurlSharp.dll 直接作为引用进行添加 (源代码里面,默认是直接将CurlSharp项目作为引用添加到EasyGet项目的)
另外需要注意的是,dll的版本,区分x86和x64
项目编译的时候需要选择目标平台
CurlSharp的更多相关文章
随机推荐
- [Mongo] How to Install Mongo on Debian(不要安装)
Install MongoDB on Debian¶ This tutorial outlines the steps to install MongoDB on Debian systems. Th ...
- Inside TSQL Querying - Chapter 3. Query Tuning
Tuning Methodology When dealing with performance problems, database professionals tend to focus on t ...
- knockout之各种数据绑定方法:text、attr、visible、html、css、style绑定
http://knockoutjs.com/documentation/attr-binding.html(Knockout官网文档) 1.text绑定 目的:text 绑定到DOM元素上,使得该元素 ...
- virtualbox -centos ping不通外网
centos上配置网卡自动获取ip 在路由器上配置了ip和mac绑定.ping不通外网.删除路由器上的静态mac绑定后OK,不明
- Linux内核抢占与中断返回【转】
转自:http://blog.csdn.net/tommy_wxie/article/details/7425728 版权声明:本文为博主原创文章,未经博主允许不得转载. [html] view pl ...
- HttpContext.Current.Cache在控制台下不工作
说明: Cache 类不能在 ASP.NET 应用程序外使用.它是为在 ASP.NET 中用于为 Web 应用程序提供缓存而设计和测试的.在其他类型的应用程序(如控制台应用程序或 Windows 窗体 ...
- vs2010 仿XCode风格的头注释宏
Sub DocumentFileHeader() Dim star As String star = "//***************************************** ...
- php的header()函数之设置content-type
//定义编码 header( 'Content-Type:text/html;charset=utf-8 '); //Atom header('Content-type: application/at ...
- 【转】如何安装mysql服务
转载地址:http://www.2cto.com/database/201211/168081.html 我刚开始安装mysql的时候,在windows的服务里面可以看到,但是装了以后有一段时间没有 ...
- c# XML省市联动
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...