将MVC迷你分析器升级到最新版本时出现问题

本文关键字:新版本 最新版 问题 MVC 分析器 | 更新日期: 2023-09-27 18:09:58

我已经在开发和生产(azure)中使用Mini Profiler一段时间了,我很喜欢它。

它今天试图通过NUGET升级到最新版本。DLL得到放置在bin,但我的网站得到一个错误。如果我回到旧的dll,它工作得很好。有人知道怎么解决这个问题吗?

 Server Error in '/' Application.
Could not load file or assembly 'MvcMiniProfiler, Version=2.0.4177.17902, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MvcMiniProfiler, Version=2.0.4177.17902, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MvcMiniProfiler, Version=2.0.4177.17902, Culture=neutral, PublicKeyToken=null' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM'Software'Microsoft'Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM'Software'Microsoft'Fusion!EnableLog].
Stack Trace: 

[FileLoadException: Could not load file or assembly 'MvcMiniProfiler, Version=2.0.4177.17902, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   MyGlobal.application_BeginRequest(Object sender, EventArgs e) in C:'Users'Nate'Documents'Visual Studio 2010'Projects'TrainerRoad'com.TrainerRoad.DataAccess'MyGlobal.cs:15
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

将MVC迷你分析器升级到最新版本时出现问题

请务必阅读http://code.google.com/p/mvc-mini-profiler/

上的文档

特别是:

  • 确保你删除了你对web.config所做的所有修改。
  • 如果你正在分析实体框架,抓住MiniProfiler。EF包
  • 如果您正在运行最新的EF,请参阅:使用SQL Server CE与实体框架代码优先和ASP的问题。. NET MVC 3和MVC miniprofiler

没有MiniProfiler版本2.0.4177.17902,所以我真的不知道它是从哪里来的