When I try to run the solution, I'll get an error: Could not load file or assembly 'System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.Net.Http version 4.0.0 is always in use. I have tried to update, downgrade and god knows what for hours now. Nothing I've tried works.
This is my project.json:
{
"dependencies": {
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Routing": "1.0.1",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.2",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.2",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.2",
"Microsoft.Extensions.Configuration.Json": "1.1.2",
"Microsoft.Extensions.Configuration.UserSecrets": "1.1.2",
"Microsoft.Extensions.Logging": "1.1.2",
"Microsoft.Extensions.Logging.Console": "1.1.2",
"Microsoft.Extensions.Logging.Debug": "1.1.2",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.2",
"Microsoft.ServiceFabric": "5.6.220",
"Microsoft.ServiceFabric.AspNetCore.WebListener": "2.6.220",
"Microsoft.ServiceFabric.Data": "2.6.220",
"Microsoft.ServiceFabric.Services": "2.6.220",
"Microsoft.AspNetCore.Mvc.Formatters.Xml": "1.0.1",
"Microsoft.AspNetCore.Authentication.Cookies": "1.1.1",
"microsoft.aspnetcore.authentication.jwtbearer": "1.1.1",
"System.Net.Http": "4.3.2"
},
"tools": {
},
"frameworks": {
"net461": {}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"web.config"
]
},
"scripts": {
}
}
In there I have written "System.Net.Http": "4.3.2"
, but as you can see in this image, the reference version is 4.0.0:
What am I doing wrong and how can I fix it? I'm getting a bit confused. I declare 4.3.2, the reference is 4.0.0 and the error says 4.1.1? I have searched everywhere for version 4.1.1, but didn't find anything.
Edit: I'm using VS 2015 on a windows 7 machine.
I have also tried to redirect to the correct assembly version in the config json file with no success.