You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I consume 2 APIs: A and B. They both provide a NuGet package with Refit interfaces and DTOs inside. But A uses Refit 5.* and B uses Refit 7.*. When I use both interfaces in the same project, one of them works and another fails with:
{class name} 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.
I assume it must be because attributes from different versions of Refit are considered to be different types at runtime and Refit cannot find the attribute it is looking for.
What can I do to use both interfaces in the same project?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say I consume 2 APIs: A and B. They both provide a NuGet package with Refit interfaces and DTOs inside. But A uses Refit 5.* and B uses Refit 7.*. When I use both interfaces in the same project, one of them works and another fails with:
I assume it must be because attributes from different versions of Refit are considered to be different types at runtime and Refit cannot find the attribute it is looking for.
What can I do to use both interfaces in the same project?
Beta Was this translation helpful? Give feedback.
All reactions