0

So i've just installed miniprofiler.mvc to my web project and it seems to be working fine. Except I cant figure out what to do to set up EF Code First and the docs seem to be outdated.

My project has a MyApp.DAL project where the EF stuff lives.

What do I need to do to start profiling EF? please help?

UPDATE:

I have installed MiniProfiler.EF 2.0.2 and now I get

Could not load file or assembly 'EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

nacho10f
  • 5,266
  • 5
  • 35
  • 70
  • 1
    PM> Install-Package MiniProfiler.EF – Chase Florell Apr 10 '12 at 19:48
  • http://stackoverflow.com/questions/6550046/using-mvc-mini-profiler-database-profiling-with-entity-framework-code-first – Kevin LaBranche Apr 10 '12 at 19:49
  • [Read This](http://stackoverflow.com/questions/7492287/referencing-entityframework-4-1-namespace-in-mvc3-razor-view)``/``/``/`` – Chase Florell Apr 10 '12 at 19:56
  • [Here's a little more info](http://stackoverflow.com/a/215054/124069). Basically you're referencing the wrong assembly somewhere. – Chase Florell Apr 10 '12 at 20:06
  • The thing is I have EF installed only in MyProject.DAL... I dont have or need reference to EF anywhere else in my code.... I use nuget to manage my libraries and it only displays EF 4.3 as a installed package :s .... dont understand why MiniProfiler is looking for EF 4.1 specifically. – nacho10f Apr 10 '12 at 20:12
  • maybe fire a like to this question over to @samsaffron on twitter. – Chase Florell Apr 10 '12 at 20:21
  • 1
    so i've "fixed" it by simply adding EF to my Web Project... :s – nacho10f Apr 10 '12 at 20:27
  • I know but it seems kind of odd to me... I wanted to keep EF as separate as possible from my web project.... having to add that reference just for this seems absurd. there's gotta be a way – nacho10f Apr 11 '12 at 22:27

2 Answers2

2

Have you made sure to install the EF package from Nuget?
http://nuget.org/packages/MiniProfiler.EF

PM> Install-Package MiniProfiler.EF

Chase Florell
  • 42,985
  • 56
  • 169
  • 364
-1

i've "fixed" it by simply adding EF to my Web Project

This is not ideal but it will do for now.

nacho10f
  • 5,266
  • 5
  • 35
  • 70