-
Notifications
You must be signed in to change notification settings - Fork 726
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
Ambiguous reference for entities on namespace System #94
Comments
Thanks @brenovieira |
This scenario should work as of 0.11.0 since now we are generating usings inside the namespace |
@stankovski , 👍 I believe that is right ! |
@stankovski , please reopen this issue. I updated to 0.12.0 and it generated the same problem, even with usings inside the namespace. Please, see what it generated (part of) in this gist. The lines - 59, 135, 142 - don't compile since it has Action, which is defined in namespace Models and System. On line 7 you add So you define both and it has an ambigous reference. note: note2: |
Tracking via: https://www.pivotaltracker.com/story/show/107076350 |
I have a class Action.
AutoRest generates a class Action on namespace MyNamespace.Models and
ActionOperations, ActionOperationsExtensions and IActionOperations on namespace MyNamespace.
Methods on both ActionOperations, ActionOperationsExtensions and IActionOperations reference Action and have "using System" which causes an ambigous reference between 'System.Action' and 'MyNamespace.Models.Action'.
I see four solutions:
For example, put both Action, ActionOperations, ActionOperationsExtensions and IActionOperations on MyNamespace.
For example, adding "using Action = MyNamespace.Models.Action".
Microsoft.Rest.HttpOperationResponse<System.Collections.Generic.IList<MyNamespace.Models.Action>> result = await operations.GetWithOperationResponseAsync(authorization, cancellationToken).ConfigureAwait(false);
The text was updated successfully, but these errors were encountered: