-
-
Notifications
You must be signed in to change notification settings - Fork 748
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] Stubs No Longer Compiles If Namespaces Overlap #876
Comments
What would a minimal repro be? |
@clairernovotny I can put one together today. As I haven't put one together for C# before is there a good tool for it or just create a github repo to share it and link to that? |
Easiest thing to do is to create a couple of interfaces in the right namespaces that'll show the error in the unit test project and submit a PR. |
I think we should add |
@Dreamescaper Can you add a PR with this fix and the changes from #881 demonstrating the issue? |
Yes, a bit later. |
I had a similar build failure to this caused by a nested internal interface in a test class as there were some usings at the top of the stub file, and then some more nested within that. In that scenario I was able to fix the build break by just making the test interface non-nested. |
@martincostello |
I’ll see if I can come up with a repro tomorrow. |
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
Using statements with names that overlap are no longer properly respected when compiling the RefitStubs.g.cs. It generates the error "The type or namespace name 'Security' does not exist in the namespace 'Project.Common' (are you missing an assembly reference?)". This was working just fine with version 5.0.23.
Steps To Reproduce
A workaround currently is to do the following:
NOTE
global::
is required to make the code compile correctly.Expected behavior
It should compile without error and without having to add
global::
orusing SomeType = global::Common.Security.SomeType;
. Just referencingusing Common.Security;
should compile.Environment
The text was updated successfully, but these errors were encountered: