0

After doing push from git server I got this error when I build and open my project:

Could not load file or assembly 'System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=******' or one of its dependencies. The system cannot find the file specified.

The project is working pretty well with the same code in a different computer.

Eliran
  • 157
  • 1
  • 13

2 Answers2

1

Problem

The error is a file not found, like the one I helped out with the other day:

Could not load file or assembly .. The system cannot find the file specified.

Troubleshooting

Open ProcessMonitor and run it when VS won't let you build your solution and throws the error. Stop the trace when it fails and investigate ProcMon's (Filemon) log to see where the IDE is looking for the DLL it cant find.

Solution

Put the DLL where its expected to be found (this will hopefully sort out the VS library referencing failure).


Also try:

  1. disable Resharper
  2. restart VS
  3. clean & rebuild
Community
  • 1
  • 1
Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321
0

I found nuget or some other update can bump the System.Web.MVC version to 4.0.0 unintentionally. So just check the dll that you have in your bin folder (or wherever the reference points) is of the same version specified in your web.config.

Wurd
  • 465
  • 2
  • 15