Last post Aug 16, 2013 10:11 PM by firstname.lastname@example.org
Aug 10, 2013 09:27 PMemail@example.com|LINK
I recently changed the default .net version of my project from 4.5 -> 4.0 as my host does not support the new version as yet. I have a reference to the System.Net.Http, Version=184.108.40.206 in my project already. I tried to find the System.Net.Http, Version=220.127.116.11
but it can't see it in the list of references. Do I need to install another framework or something?
The type 'System.Net.Http.HttpMessageHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Aug 10, 2013 10:25 PM|oned_gk|LINK
Aug 12, 2013 05:47 AM|Starain chen - MSFT|LINK
Thanks for your post!
We can’t find System.Net.Http reference when the project is based on .Net Framwork4.0.
Base on you said that “Error 29 The type 'System.Net.Http.HttpMessageHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'”, I
would like to know when did the error appear,did you build your project or run project on your .Net Framwork4.0 environment?
Base on oned_gk said, we can find it should work in .Net4.5, however, I did some test as follows (My environment is based on .NET Framwork4.5):
System.Net.Http.HttpClient c = new HttpClient();
HttpMessageHandler h = null;
4. Change the project from 4.5 to 4.0
5. Build the project and click F5
6. Now it's fine
4. Build the project and click F5
5. Now it's fine
So, please try add a new project as I do and check the results.
This reference below may benefit you:
Aug 16, 2013 10:11 PMfirstname.lastname@example.org|LINK
Hi Starain, thanks for posting a very comprehensive answer. I followed your instructions (a) and that issue has gone now.