ASP.NET MVC MiniProfiler and EntityFramework 6 Initialization

雨燕双飞 提交于 2019-12-01 03:25:45
tlatourelle

Turns out that this may be related to versions and ids. If you install MiniProfiler.EntityFramework6 without installing the other packages, nuget will handle the dependencies, but it puts the wrong #s in the web.config here (make sure the version number is correct):

 <dependentAssembly>
    <assemblyIdentity name="MiniProfiler" publicKeyToken="b44f9351044011a3" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-3.2.0.157" newVersion="3.2.0.157" />
  </dependentAssembly>

If you uninstall all the MiniProfiler packages and then install in this order:

MiniProfiler
MiniProfiler.MVC4
MiniProfiler.EF6

It seems to work ok.

For others having similar issues This is how I resolved

Please analyze what version of Entity Framework your application is using PM> Get-Package

and then install MiniProfiler.EF accordingly

Like in my case I installed Install-Package MiniProfiler.EF5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!