0
votes

I am trying to run a project on my system (the project is in mvc and azure ). i am able to build the project but it is showing error on run time .the error message is as following :-

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

2

2 Answers

0
votes

Check the .net version in your IIS app pool. Also check the target version in your project properties and make sure you are targeting the same version your IIS app pool is configured for. You should be targeting 4.0+.

0
votes

The likely problem is the target machine doesn't have the target assemblies installed.

You should make sure you have .NET framework v4 installed.

This shouldn't be happening on the same machine which the solution was built, as the assemblies are required during the build process.

This is a common-case that, I don't know who downvoted this question, but just because you don't know what this guy is talking about doesn't mean the question is invalid, of poor quality, etc. fact is this is enough information to solve the problem, barring any crazy, environment-specific problems created by the user.

Hope this helps others out there!