1

When trying to run my project/website I get the error message:

Could not load file or assembly 'System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I don't know where the System.Web.Helpers is coming from it is not even referenced in my solution. I did a find all for System.Web.Helpers and on 3.0.0.0 and it found neither. Also this project is working for other people on my team on the same branch.

I've looked around the internet and tried a lot of the solutions. Running out of ideas.

Beastwood
  • 446
  • 3
  • 19
  • capture a ETW trace which includes Fusion, AssamblyLoad and Exception Data. I wrote here a WPR profile which includes the data: http://stackoverflow.com/a/30289933/1466046. Zip the ETL, upload the zip to OneDrive and post a link here. – magicandre1981 Jul 08 '15 at 03:59
  • Is it listed in your web.config by any chance? – Mr Moose Jul 08 '15 at 04:00
  • @MrMoose no it isn't referenced anywhere – Beastwood Jul 08 '15 at 12:53
  • capture the trace, here I can see what is wrong. – magicandre1981 Jul 08 '15 at 16:59
  • @Beastwood, there are [other posts](http://stackoverflow.com/questions/25261025/could-not-load-file-or-assembly-system-web-helpers-or-one-of-its-dependencies) and [answers](http://stackoverflow.com/a/21088707/685760) that suggest that this could be due to MVC not being installed on the target machine. It is possible, that while you haven't explicitly referenced it, if it is required due to your project relying on MVC, if your machine doesn't have the required libraries installed (and your other developers do have that installed), then maybe that is the issue. – Mr Moose Jul 09 '15 at 02:26

1 Answers1

0

For myself, I had to remove all <dependentAssembly> references to the DLLs being complained about from:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

Once removed this issue was fixed. I also ensured MVC 3 and MVC 4 were installed via the Web Platform Installer

sean2078
  • 5,131
  • 6
  • 32
  • 32