refit: [BUG] Still doesn't look like a Refit interface. Make sure it has at least one method with a Refit HTTP method attribute and Refit is installed in the project
version:Refit.6.0.15.nupkg netframework:4.8
using System.Threading.Tasks;
using Refit;
namespace SnapOffline
{
public interface IWtApi
{
[Post("/xx/showreport.asp")]
Task<ResponseShowReport> ShowReport([Body(BodySerializationMethod.UrlEncoded)]
RequestShowReport req);
}
}
System.InvalidOperationException: IWtApi doesn't look like a Refit interface. Make sure it has at least one method with a Refit HTTP method attribute and Refit is installed in the project.
在 Refit.RestService.GetGeneratedType(Type refitInterfaceType) 位置 /_/Refit/RestService.cs:行号 100
在 Refit.RestService.For(Type refitInterfaceType, HttpClient client, IRequestBuilder builder) 位置 /_/Refit/RestService.cs:行号 36
在 Refit.RestService.For[T](HttpClient client, IRequestBuilder`1 builder) 位置 /_/Refit/RestService.cs:行号 13
在 Refit.RestService.For[T](HttpClient client, RefitSettings settings) 位置 /_/Refit/RestService.cs:行号 20
在 Refit.RestService.For[T](HttpClient client) 位置 /_/Refit/RestService.cs:行号 23
在 SnapOffline.Program.Main(String[] args) 位置 E:\work\med\MedSnap\weitong\Snap\SnapOffline\Program.cs:行号 23
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (6 by maintainers)
.Net Framework winforms version .Net Framework 4.6.1 “Developer Command Prompt” path is C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools
.csproj value is
.NET 5.0 Winforms version .NET(5) it is success , don’t throw exception.
.csproj value is