reactiveui / refit

The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.

Home Page:https://reactiveui.github.io/refit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: RestService cannot load Refit Interface from a class loaded by CompositionContainer.ComposeParts()

tzraeq opened this issue · comments

commented

Describe the bug 🐞

I have a library project, it depends on the Refit 7.0.0, and it call RestService.For() in its init method.
My application load this library by CompositionContainer.ComposeParts(),but I got the "XXX 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" exception.

Step to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Reproduction repository

https://github.com/reactiveui/refit

Expected behavior

This should happen...

Screenshots 🖼️

No response

IDE

Visual Studio 2022

Operating system

Windows

Version

10

Device

PC

Refit Version

7.0.0

Additional information ℹ️

No response