10

I have a MVC app, I used http://nuget.org/ to install Elmah for MVC, I Was able to install it and run it successively.

After few week reopening Visual Studio I Get this error:

Could not load file or assembly 'Elmah' or one of its dependencies. The system cannot find the file specified. 


Error
<httpModules>
Line 73:       <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />

I tried to add a reference in the project to Elmah.Mvc but with no success. Could you point me out how to fix this problem? Thanks

GibboK
  • 71,848
  • 143
  • 435
  • 658
  • I had this issue as well and solved it by setting "Copy Local" to true – user2865446 Aug 10 '16 at 20:18
  • Had similar error, turns out I was targeting the wrong configuration and had recently added ELMAH. The ELMAH DLLs were missing from my /bin folder and IIS was pointing to Debug root. – Jason Slocomb Apr 18 '19 at 17:27

2 Answers2

14

Reinstall Elmah.Mvc via NuGet would be my advice. If this doesn't help, try reinstalling the elmah.corelibrary NuGet package (being a dependency of Elmah.Mvc).

aknuds1
  • 65,625
  • 67
  • 195
  • 317
0

My project was using Elmah.Io.Log4Net. I got the same error messages above "The system cannot find the file specified". I installed Elmah.Io.Mvc 4.3.40 version and the error went away. So, the same problem happens in Elmah.Io that happens in the older Core version.