ASP.NET MVC MiniProfiler and EntityFramework 6 Initialization

后端 未结 2 1853
生来不讨喜
生来不讨喜 2021-01-12 01:19

I have a similar issue in that after loading MiniProfiler and MiniProfiler.EnitiyFramework6 I have this issue. MiniProfiler runs fine, but when I add to my Applcation_Start

相关标签:
2条回答
  • 2021-01-12 01:33

    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.

    0 讨论(0)
  • 2021-01-12 01:46

    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

    0 讨论(0)
提交回复
热议问题