I'm struggling to have my application working after deploy to Windows 2003 server. After some investigation it seems that I have a problem with the way application is build/published or configured. This is what happens:
- on my developers machine I have a MVC4 project (targets .NET 4 and ASP .NET 4). Everything runs smoothly. I have many NuGet packages referenced by the project. And one of them is
packages\Microsoft.Net.Http.2.2.15\lib\net40\System.Net.Http.dll
- after deploying the application to Windows 2003 server, and (I hope) properly configuring IIS etc I get the following exception:
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)
And I don't know what is happening. I've checked bin folder on the server and I can see System.Net.Http.dll dll with version 2.2.15. So why application is trying to load System.Net.Http.dll with version 2.0.0