Multiple ASP.NET WebApi assemblies contains references to System.Net.Http version 2.0.0.0. When targeting .NET 4.5, the Microsoft.Net.Http NuGet package will link to the newer System.Net.Http version 4.0.0.0 that ships as part of the .NET Framework.
This causes an assembly version conflict in WebApi projects that target .NET 4.5. WebApi links to version 2.0 of System.Net.Http, while the ASP.NET Project and the rest of .NET links to version 4.0 in the GAC.
One area this problem is evident is when running Code Analysis on builds - if types inside of System.Net.Http are used, Code Analysis will fail with the error "CA0058 Error Running Code Analysis CA0058 : The referenced assembly 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be found."
None of the WebApi NuGet packages install the correct binding redirects, and even then Code Analysis would still fail as binding redirects are only evaluated by the executing process.
This causes an assembly version conflict in WebApi projects that target .NET 4.5. WebApi links to version 2.0 of System.Net.Http, while the ASP.NET Project and the rest of .NET links to version 4.0 in the GAC.
One area this problem is evident is when running Code Analysis on builds - if types inside of System.Net.Http are used, Code Analysis will fail with the error "CA0058 Error Running Code Analysis CA0058 : The referenced assembly 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be found."
None of the WebApi NuGet packages install the correct binding redirects, and even then Code Analysis would still fail as binding redirects are only evaluated by the executing process.