无法加载文件或程序集:找到的程序集的清单定义与程序集引用不匹配
Could not load file or assembly: The located assembly's manifest definition does not match the assembly reference
我有一个 Dev Express 网络应用程序在本地主机上运行良好,但在实时站点上运行不正常。
我已经记录了 Dev Express 的问题,但我也在这里记录它,因为它可能是 .net 问题。
我仔细检查了项目中的引用,没有找到任何过时的引用。
错误日志显示
26.12.15 11:40:23.780 ================================================================================
26.12.15 11:40:23.796 Trace Log for /LM/W3SVC/19/ROOT-2-130955658098893565 is started
26.12.15 11:40:23.796 ================================================================================
26.12.15 11:40:23.796 System Environment
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
.Net Framework Versions: v2.0.50727, v4.0.30319
CLR Version: 4.0.30319.34209
eXpressApp Version: 15.2.4.0
Application config
Modules=
ErrorReportEmail=
ErrorReportEmailServer=
SimpleErrorReportPage=
RichErrorReportPage=Error.aspx
EnableDiagnosticActions=False
26.12.15 11:40:23.811 The ValueManagerType is initialized by the default value: SimpleValueManager.
26.12.15 11:40:23.811 Stack trace:
at DevExpress.Persistent.Base.ValueManager.CreateValueManager[ValueType](String key)
at DevExpress.Persistent.Base.ValueManager.GetValueManager[ValueType](String key)
at DevExpress.ExpressApp.SecuritySystem.get_CurrentUserName()
at DevExpress.ExpressApp.Web.ErrorInfo.Initialize(Exception exception, String lastTraceEntries)
at DevExpress.ExpressApp.Web.ErrorHandling.ProcessApplicationError()
at SBD.FileUploads.Web.Global.Application_Error(Object sender, EventArgs e) in E:\EShared\Dev2015\SBD.FileUploads\SBD.FileUploads.Web\Global.asax.cs:line 52
at System.Web.HttpApplication.RaiseOnError()
at System.Web.HttpApplication.RecordError(Exception error)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
26.12.15 11:40:23.968 no context Cannot send alert email to admin
26.12.15 11:40:23.968 no context Error ID: afdfe65f-6113-4991-bf30-a97f1deca79b
================================================================================
The error occurred:
Type: FileLoadException
Message: Could not load file or assembly 'DevExpress.ExpressApp.Web.v15.2, Version=15.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Data: 0 entries
Stack trace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail)
at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean throwOnFail)
at System.Web.UI.TemplateParser.AddAssemblyDependency(String assemblyName, Boolean addDependentAssemblies)
at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistrationCore(TagNamespaceRegisterEntry nsRegisterEntry)
at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(TagNamespaceRegisterEntry nsRegisterEntry)
at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
InnerException is null
我查看了 this question about winforms,但我的问题出在网络表单中。我确实看到一些答案涉及 Dev Express。我检查了我的许可证文件,它不包括旧版本。
您似乎错过了更新其中一个模块中的程序集引用。
最简单的修复方法是 运行 DevExpress ProjectConverter(默认位置 C:\Program Files (x86)\DevExpress 15.2\Components\Tools\Components)。它将修复所有文件(和子文件夹)中的引用。
如果你还有什么问题,DevExpress Support Center就是问的地方。
我有一个 Dev Express 网络应用程序在本地主机上运行良好,但在实时站点上运行不正常。
我已经记录了 Dev Express 的问题,但我也在这里记录它,因为它可能是 .net 问题。
我仔细检查了项目中的引用,没有找到任何过时的引用。
错误日志显示
26.12.15 11:40:23.780 ================================================================================
26.12.15 11:40:23.796 Trace Log for /LM/W3SVC/19/ROOT-2-130955658098893565 is started
26.12.15 11:40:23.796 ================================================================================
26.12.15 11:40:23.796 System Environment
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
.Net Framework Versions: v2.0.50727, v4.0.30319
CLR Version: 4.0.30319.34209
eXpressApp Version: 15.2.4.0
Application config
Modules=
ErrorReportEmail=
ErrorReportEmailServer=
SimpleErrorReportPage=
RichErrorReportPage=Error.aspx
EnableDiagnosticActions=False
26.12.15 11:40:23.811 The ValueManagerType is initialized by the default value: SimpleValueManager.
26.12.15 11:40:23.811 Stack trace:
at DevExpress.Persistent.Base.ValueManager.CreateValueManager[ValueType](String key)
at DevExpress.Persistent.Base.ValueManager.GetValueManager[ValueType](String key)
at DevExpress.ExpressApp.SecuritySystem.get_CurrentUserName()
at DevExpress.ExpressApp.Web.ErrorInfo.Initialize(Exception exception, String lastTraceEntries)
at DevExpress.ExpressApp.Web.ErrorHandling.ProcessApplicationError()
at SBD.FileUploads.Web.Global.Application_Error(Object sender, EventArgs e) in E:\EShared\Dev2015\SBD.FileUploads\SBD.FileUploads.Web\Global.asax.cs:line 52
at System.Web.HttpApplication.RaiseOnError()
at System.Web.HttpApplication.RecordError(Exception error)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
26.12.15 11:40:23.968 no context Cannot send alert email to admin
26.12.15 11:40:23.968 no context Error ID: afdfe65f-6113-4991-bf30-a97f1deca79b
================================================================================
The error occurred:
Type: FileLoadException
Message: Could not load file or assembly 'DevExpress.ExpressApp.Web.v15.2, Version=15.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Data: 0 entries
Stack trace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail)
at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean throwOnFail)
at System.Web.UI.TemplateParser.AddAssemblyDependency(String assemblyName, Boolean addDependentAssemblies)
at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistrationCore(TagNamespaceRegisterEntry nsRegisterEntry)
at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(TagNamespaceRegisterEntry nsRegisterEntry)
at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
InnerException is null
我查看了 this question about winforms,但我的问题出在网络表单中。我确实看到一些答案涉及 Dev Express。我检查了我的许可证文件,它不包括旧版本。
您似乎错过了更新其中一个模块中的程序集引用。
最简单的修复方法是 运行 DevExpress ProjectConverter(默认位置 C:\Program Files (x86)\DevExpress 15.2\Components\Tools\Components)。它将修复所有文件(和子文件夹)中的引用。
如果你还有什么问题,DevExpress Support Center就是问的地方。