如何使用Dreamweaver引用log4net [英] How to reference log4net using dreamweaver

查看:67
本文介绍了如何使用Dreamweaver引用log4net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经苦苦挣扎了2天,我在VS中做到了,但是在Dreamweaver CS5中却无法使用.我将dll放入bin文件夹中,并放入web.confg中,但没有任何效果.

我收到此错误:

I have been strugling for 2 days, I did this in VS but it won''t work in dreamweaver cs5. I put the dll in the bin folder and put in the web.confg and nothing works.

I get this error:

System.IO.FileLoadException: Could not load file or assembly ''log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'' or one of its dependencies. The located assembly''s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)



我需要帮助进行设置.我这样做是因为我想使用crystalreports,并将这些dll文件放在bin文件夹中,而log4net却没有错误.



I need help setting this up. I am doing this because I want to use crystalreports and I put those dll files in the bin folder and I get no error only for log4net.

推荐答案

您确定程序集的版本正确.似乎正在寻找1.2.10.0,是您bin文件夹中的版本吗?
Have you made sure the versions of the assembly is correct. It appears to be looking for 1.2.10.0, is that the version in your bin folder?


我发现了问题.
Crystal也正在使用并安装具有该确切版本号的log4net程序集.问题:Crystal决定将Strongname(公用密钥令牌)更改为692fbea5521e1304(例如其自己的dll的strng名称)

因此您的应用程序引用的是一个已发生2次的DLL:在BIN文件夹和GAC中.版本相同,但公钥令牌不同.

因此,在解决方案中,您在BIN文件夹中引用了文件的公钥令牌,但是在编译时,visual studio复制了GAC中的文件! 并且在运行时,也难怪该应用程序期望一个强名称,并且获得其他名称.
都是水晶的错.
我建议使用安装了Crystal的log4net,而不要使用从apache下载的log4net
i found the problem.
crystal is also using and installing the log4net assembly with that exact version number. the problem: crystal decided to change the strongname (public key token ) to 692fbea5521e1304 (like the strng name of their own dlls)

so your application isreferencing a DLL that has 2 occurrenced: in the BIN folder and in the GAC. the version is the same but the Public key token is different.

so in the solution you reference the public key token of the file in the BIN foldr, but when compiling, visual studio copies the file that is in the GAC !
and when running , no wonder that the application is expecting one strong name, and getting something else.
it''s all crystal''s fault.
i suggest using the log4net that crystal installed, instead of the one downloaded from apache


这篇关于如何使用Dreamweaver引用log4net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆