Could not load file or assembly 'System.Web.Mvc, Version=5.2.2.0, Culture=neutral

0
=
0
+
0
No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.
0

I am not sure what exactly has changed but suddenly I am getting this error when trying to launch a Web Api project. (everything is comiled without errors). Here is the error that I am getting at run time:

Could not load file or assembly 'System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

Maybe somebody knows how to solve it?

2 answers

2
=
0
=
$0
Internet users could send Bitcoin Tips to you if they like your answer!

Or you can update MVC package and it should work via NuGet.

Example:

enter image description here

SEND BITCOIN TIPS
1

You need to reinstall Microsoft.AspNet.WebApi package via NuGet.

You can run this in the NuGet console:

Update-Package Microsoft.AspNet.WebApi -reinstall

I hope it helped you :)

SEND BITCOIN TIPS
0

Too many commands? Learning new syntax?

FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.

Boost your productivity with FavScripts.com!

Post Answer