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

1
  • This question might be helpful if you happen to be using ReSharper. Commented Sep 1, 2017 at 1:52

1 Answer 1

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.
Sign up to request clarification or add additional context in comments.

1 Comment

@Noha Basiony,I hope this is useful ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.