1

Currently I using .NET version 7 to do background job service. I add Worker Service project, in Program.cs file I cannot call method AddRefitClient although I add package Refit to call API. I don't want to use HttpClient

This is error message:

'IServiceCollection' does not contain a definition for 'AddRefitClient' and no accessible extension method 'AddRefitClient' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)

enter image description here

Marcelo Paco
  • 2,732
  • 4
  • 9
  • 26
Truc
  • 386
  • 4
  • 12

1 Answers1

3

You also need the package Refit.HttpClientFactory to install.

Abusive Vids
  • 191
  • 1
  • 10