1

Could you please help me to know why this error appear ??

error:Severity Code Description Project File Line Suppression State Error CS0121 The call is ambiguous between the following methods or properties: 'System.Net.Http.HttpClientExtensions.SetBearerToken(System.Net.Http.HttpClient, string)' and 'System.Net.Http.HttpClientExtensions.SetBearerToken(System.Net.Http.HttpClient, string)' ImportTrustsApp C:\@Noha Basiony\NowInfinity Web\web\smsf.web\ImportTrustsApp\Program.cs 45 Active

enter image description here

Noha Basiony
  • 11
  • 1
  • 3
  • [This](https://stackoverflow.com/questions/31729186/c-sharp-compiler-cs0121-the-call-is-ambiguous-between-the-following-methods-or) question might be helpful if you happen to be using ReSharper. – Poosh Sep 01 '17 at 01:52

1 Answers1

2

It appears that older versions of System.Net.Http.HttpClientExtensions assemblies have been cached and now they conflict with the newly installed assemblies. Please follow these steps, which should help you overcome the problem:

  1. Delete your current System.Net.Http.HttpClientExtensions reference.
  2. Add new System.Net.Http.HttpClientExtensions reference.
  3. Close Visual Studio .
  4. Clear the project's Bin and Obj folders.
  5. Rebuild your application.