2

I am building a UWP App in VS 2015 that uses BingSearchContainer. I am getting an error about the system.net version. It wants v5.0, but if I look at my version of system.Net.dll it is 4.6.23123. Can't figure out how to update it. Actual error is:

The type 'ICredentials' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'

Not sure how to update that file. All my Nuget pkgs are up to date as well as VS2015 itself.

Yosem
  • 4,685
  • 3
  • 22
  • 29
  • It looks like 5.0 is a Silverlight version. What webbrowser are you using? The webpage doesn't like your html headers. Trying connecting to webpage with an browser manually and see if it works. If it does, use a sniffer like fiddler or wireshark and capture results. Then compare with you C# application. You need to fix the html headers. When you connect to the webpage a negotiation occurs using the headers. You can usually fix issue by adding/changing headers. – jdweng Jan 02 '16 at 18:54
  • thanks,but to clarify, I am building a UWP App in VS 2015 that uses BingSearchContainer and when I try to build the app I get that error. I cant even get to the point of trying the query. (I have re-edited my original question to clarify that) – Yosem Jan 02 '16 at 19:07
  • 1
    How did you install BingSearchContainer? It may need to be fully recompiled? It is looking for an IE Browser with Silverlight. Upgrade you IE. – jdweng Jan 02 '16 at 19:22
  • That fixed that issue, but now I am getting an error:Type universe cannot resolve assembly: Microsoft.Data.OData, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, which I believe is dependency of Microsoft.Data.Services.Client. – Yosem Jan 03 '16 at 00:10
  • Is this a compiler error or a run time error? The best think to do is to backup the bin folder in the project and then delete the bin. This will force the project to get completely rebuilt. Some times when upgrades are made the dependencies in the project don't recompile everything automatically. If it is a runtime error try using a sniffer to find issue. There still may be some negotiation issues with the html headers. – jdweng Jan 03 '16 at 07:56
  • Thanks, I tried that, but I think I fixed it by bringing up Nuget pkg manager and 'downgrading' (reinstalling) Microsoft.Data.OData to the version it was looking for 5.6.2. I had 5.7 – Yosem Jan 03 '16 at 14:14

0 Answers0