Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing System.Net.Http after upgrading Visual Studio to 15.5

We've got an existing solution consisting of an ASP.NET MVC project and a bunch of libraries, all of the projects are targeting .NET 4.6.1.

After upgrading Visual Studio from 15.3 to 15.5 I get a few compile errors stating that it can't find the System.Net.Http assembly.

The type 'HttpResponseMessage' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

I read the release notes but I could not find anything that would cause this issue. Why would upgrading Visual Studio from 15.3 to 15.5 result in these errors?

like image 814
Joakim Skoog Avatar asked Dec 07 '17 07:12

Joakim Skoog


People also ask

What is System Net HTTP?

Provides a programming interface for modern HTTP applications, including HTTP client components that allow applications to consume web services over HTTP and HTTP components that can be used by both clients and servers for parsing HTTP headers.

What is System net in C#?

Classes in the System.Net namespace can be used to develop Windows Store apps or desktop apps. When used in a Windows Store app, classes in the System.Net namespace are affected by network isolation feature, part of the application security model used by the Windows Developer Preview.


1 Answers

I guess your issue is related to what is written here https://developercommunity.visualstudio.com/content/problem/160241/errors-reported-when-none-exist.html because it appears this is all about project references. Please see if the proposed solution there

Uncheck option "Allow parallel project initialization"

helps you as well.

By the way, it is worth mentioning that 15.5 updated apparently brought up other serious issues to existing projects as written here https://developercommunity.visualstudio.com/content/problem/160609/vb-option-strict-on-warnings-are-shown-on-existing.html

I hope all this helps to solve your issue or to investigate on it deeper, at least.

like image 138
lucamauri Avatar answered Oct 03 '22 10:10

lucamauri