Closed yoelhalb-hitech closed 2 weeks ago
Can you contribute a PR that adds this as a test case?
It actually looks like there are several test cases which check for something similar to this.
Should these tests be modified in some way so that they accurately check for 3 interfaces of the same name, instead of just 2?
V7.2.1 should resolve this issue, thank you for your feedback. If you identify anything that didn't get resolved please raise a new issue with the updated information, thank you.
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 š
When having more than two Refit interfaces with the same name in the same project (but different namespaces or different enclosing type) the generator will fail to generate the classes.
The warning at compile time is:
CSC : warning CS8785: Generator 'InterfaceStubGeneratorV2' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'ITest1.g.cs' of the added source file must be unique within a generator.
While at runtime it fails with:
System.InvalidOperationException : ITest 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.
Step to reproduce
Reproduction repository
No response
Expected behavior
Otherwise it should at the minimum:
Screenshots š¼ļø
No response
IDE
Visual Studio 2022
Operating system
Windows 10
Version
No response
Device
No response
Refit Version
6.3.2
Additional information ā¹ļø
No response