简体   繁体   English

"无法加载文件或程序集“log4net,版本=1.2.10.0,文化=中性,PublicKeyToken=692fbea5521e1304”或其依赖项之一"

[英]Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies

I am getting this error since last 2 days in my Server where i had hosted application.自过去 2 天以来,我在托管应用程序的服务器中收到此错误。 I had already tried most of the scenario mentioned here.我已经尝试过这里提到的大部分场景。 but not getting anything.但没有得到任何东西。

Here is my stack trace -这是我的堆栈跟踪 -

[FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. [FileNotFoundException:无法加载文件或程序集“log4net,版本=1.2.10.0,文化=中性,PublicKeyToken=692fbea5521e1304”或其依赖项之一。 The system cannot find the file specified.]该系统找不到指定的文件。]
CrystalDecisions.Shared.SharedUtils..cctor() +0 CrystalDecisions.Shared.SharedUtils..cctor() +0

[TypeInitializationException: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception.] [TypeInitializationException:'CrystalDecisions.Shared.SharedUtils' 的类型初始化程序引发了异常。]
CrystalDecisions.Shared.SharedUtils.get_CurrentControl() +18 CrystalDecisions.Shared.SharedUtils.get_CurrentControl() +18
CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture() +8 CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture() +8
CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(String name) +11 CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(字符串名称)+11
CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime() +143 CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +131 CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime() +143 CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +131

[TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.] [TypeInitializationException:'CrystalDecisions.CrystalReports.Engine.ReportDocument' 的类型初始化程序引发了异常。]
CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +0 CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +0
AdminReports..ctor() +25 ASP.reportviewer_aspx..ctor() +14 AdminReports..ctor() +25 ASP.reportviewer_aspx..ctor() +14
__ASP.FastObjectFactory_app_web_reportviewer_aspx_cdcab7d2.Create_ASP_reportviewer_aspx() +20 System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +109 __ASP.FastObjectFactory_app_web_reportviewer_aspx_cdcab7d2.Create_ASP_reportviewer_aspx() +20 System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +109
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +334 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184 System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +334 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Version Information: Microsoft .NET Framework Version:4.0.30319;版本信息:Microsoft .NET Framework 版本:4.0.30319; ASP.NET Version:4.0.30319.1 ASP.NET 版本:4.0.30319.1

<\/blockquote>

Already configured my IIS to allow applications to run on 32bit.已经将我的 IIS 配置为允许应用程序在 32 位上运行。

"

I have had this issue, and what fixed it for me was going to the program properties (under Project -> "Program Name" Properties) and then under the publish area, find the Application Files, and find the Log4net.dll.我遇到了这个问题,对我来说修复它的是转到程序属性(在项目->“程序名称”属性下),然后在发布区域下,找到应用程序文件,然后找到 Log4net.dll。

This was set to "Include(Auto)" for me, but that did not actually include it in the Program.这对我来说设置为“包含(自动)”,但实际上并没有将它包含在程序中。 when i set this to "Include" That fixed that issue for me.当我将其设置为“包含”时,这为我解决了该问题。

You are missing the log4net.dll or have a different version than Version=1.2.10.0 in your bin directory.您缺少 log4net.dll 或 bin 目录中的版本与 Version=1.2.10.0 不同。 Make sure you package the right log4net.dll (version).确保您打包了正确的 log4net.dll(版本)。 Or if you have multiple versions in your project you can try to rebind the versions.或者,如果您的项目中有多个版本,您可以尝试重新绑定这些版本。

  1. Verify your DLL version in your app.在您的应用中验证您的 DLL 版本。 If wrong version get the correct version using NuGet.如果版本错误,请使用 NuGet 获取正确版本。
  2. Verify DLL property "Copy Local" set to True验证 DLL 属性“Copy Local”设置为 True
  3. Under project properties, set the Platform Target to x86.在项目属性下,将平台目标设置为 x86。

For me the log4net file was there and version correct but the problem was missing runtime.对我来说,log4net 文件在那里并且版本正确,但问题是缺少运行时。 Downloaded it here: https:\/\/www.tektutorialshub.com\/crystal-reports\/how-to-download-and-install-crystal-report-runtime\/<\/a>在此处下载: https<\/a> :\/\/www.tektutorialshub.com\/crystal-reports\/how-to-download-and-install-crystal-report-runtime\/

"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决“无法加载文件或程序集&#39;log4net,版本= 1.2.10.0,PublicKeyToken = 692fbea5521e1304”? - How do I resolve “Could not load file or assembly 'log4net, Version=1.2.10.0,PublicKeyToken=692fbea5521e1304”? 无法加载文件或程序集&#39;log4net,Version = 2.0.8.0,Culture = neutral,PublicKeyToken = 1b44e1d426115821&#39;或其依赖项之一 - Could not load file or assembly 'log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies 无法加载文件或程序集“系统,版本=4.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089”或其依赖项之一 - Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies 无法加载文件或程序集&#39;System,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 561934e089&#39;或其依赖项之一 - Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=561934e089' or one of its dependencies 无法加载文件或程序集&#39;XXX,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null&#39;或其依赖项之一 - Could not load file or assembly 'XXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies 无法加载文件或程序集&#39;Dapper,Version = 1.8.0.0,Culture = neutral,PublicKeyToken = null&#39;或其依赖项之一 - Could not load file or assembly 'Dapper, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies C#:无法加载文件或程序集&#39;OpenPop,Version = 2.0.4.369,Culture = neutral,PublicKeyToken = null&#39;或其依赖项之一 - C#: Could not load file or assembly 'OpenPop, Version=2.0.4.369, Culture=neutral, PublicKeyToken=null' or one of its dependencies 无法加载文件或程序集“BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null”或其依赖项之一 - Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies 无法加载文件或程序集“System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或其依赖项之一 - Could not load file or assembly 'System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies 无法加载文件或程序集 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 或其依赖项之一 - Could not load file or assembly 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM