-
-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: IExampleInterface doesn't look like a Refit interface #1817
Comments
Same here; I had to downgrade to 7.1.2 |
Thanks for the example repository, this looks pretty severe. I don't see any implementations of @ChrisPulman any idea what has changed since 7.1.2 to cause this? |
This was run using VS2022 V17.11.3, sorry, I don't have Rider to test with. |
@TimothyMakkison Do you have Rider? If so, does this issue occur when you run it? |
I think the issue is 29e0e1c. Looks like
Yeah, I have rider and I get the same error message. |
@TimothyMakkison Thank you Tim, strange that it only affects Rider. |
I'm guessing you are on the latest version of Visual studio where they support |
I get the same problem using Visual Studio 2022. Didn’t update VS in a while. Will try that tomorrow.
|
Please update to 7.2.1 this issue should be resolved, thank you |
7.2.1 works good for me. Thanks! |
Weird development on the issue: Tried to test the issue of Refit 7.2.0 further. I had Visual Studio installed, not the most recent version, at least 3 months old. Tried to replicate the issue - success, same exception is thrown. So I updated the IDE via Visual Studio installer, to version 17.11.4. And now, whether I use VS or Rider, project builds, runs and the issue cannot be replicated. Tried to use different versions of Rider, installed via JetBrains Toolbox (specifically 2024.2.4, 2024.1.6 and 2023.3.6), couldn't replicate the issue. Anyway, Refit 7.2.1 also works fine, with no issues. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug 🐞
The project is ASP.NET Core Web API that uses Refit packages (Refit 7.2.0, Refit.HttpClientFactory 7.2.0, Refit.Newtonsoft.Json 7.2.0). It contacts 3rd party resource JSONPlaceholder via HTTP.
The interface IBlogApi lists several methods, all of them are annotated by appropriate Refit attributes.
The project uses source-generated implementations of these methods to provide various routes. When "GET /posts/1" query is performed, the following exception is thrown:
The result is similar for other queries and commands.
Step to reproduce
Reproduction repository
https://github.com/aywee26/refit-client-example
Expected behavior
The project should return OK response with a body similar to this:
Screenshots 🖼️
No response
IDE
Rider Windows
Operating system
Windows
Version
11 23H2
Device
No response
Refit Version
7.2.0
Additional information ℹ️
Current workaround: downgrade Refit packages from version 7.2.0 to 7.1.2.
The text was updated successfully, but these errors were encountered: