小编Tru*_*ruc的帖子

找不到 Worker Service 的 AddRefitClient 方法

目前我使用 .NET 版本 7 来做后台作业服务。我添加了 Worker Service 项目,在Program.cs文件中我无法调用方法AddRefitClient,尽管我添加了包Refit来调用 API。我不想使用 HttpClient

这是错误消息:

'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?)

在此输入图像描述

.net refit worker-service

3
推荐指数
1
解决办法
1628
查看次数

标签 统计

.net ×1

refit ×1

worker-service ×1