无法加载文件或程序集“log4net”或其依赖项之一。尝试加载格式不正确的程序 [英] Could not load file or assembly 'log4net' or one of its dependencies. An attempt was made to load a program with an incorrect format

查看:153
本文介绍了无法加载文件或程序集“log4net”或其依赖项之一。尝试加载格式不正确的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

我发现错误无法加载文件或程序集'log4net'或其依赖项之一。尝试加载格式不正确的程序。 。有些人之前使用过该项目。我们的应用程序中的bin文件夹中没有使用log4net.dll。但是pjct中有log4net.dll。我尝试了很多东西,但它没有用。

解决方案



只需从项目中删除它,然后尝试构建项目。因为你不需要那个。



如果你想要包含那个dll,你应该检查一下,你使用的应用程序池是否与程序集兼容。我过去遇到过这种错误。请检查dll是32位还是64位。如果是32位,则打开IIS并选择相应的应用程序池,然后转到高级设置和启用32位应用程序到真。



希望这会有所帮助!

S Francis

我的ASPDotNet博客

Hello All,
I am gettinG a error that is "Could not load file or assembly 'log4net' or one of its dependencies. An attempt was made to load a program with an incorrect format.".Some body used the project before.We are not using a log4net.dll there in the bin folder in our application.but log4net.dll is there in the pjct.I tried many things but it is not working .

解决方案

Hi,
Just remove it from the dll from your project and then try to build the project. Since you don't need that one.

In case you want to include that dll, you should check that, the application pool you are using is compatible with the assembly. I have encountered these kind of errors in my past. Please check that dll is 32 or 64 bit. If it is 32 bit, then open the IIS and select the respective app pool and go to "Advanced setting" and "Enable 32-bit Applications" to "True".

Hope this helps!
S Francis
My ASPDotNet Blog


这篇关于无法加载文件或程序集“log4net”或其依赖项之一。尝试加载格式不正确的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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