Bug Report T664215
Visible to All Users

Refactorings - Add XML Comments - A broken <see/> tag is created when generating xml comments for a method that references a generic type

created 7 years ago

Hi,

I have the following problem in CodeRush:
Steps to reproduce:
- Create an interface
- Add a method that references a generic type somehow. Example: Foo<Bar> GetFoo();
- Add an XML comment to XML comment for the method that contains a <see/> tag. Example: /// <returns>A <see cref="Foo{Bar}"/>.</returns>
- The Foo generic class and the Bar enum is in the namespace Baz.
- Add a class that implements the interface.
- To make the code compile, add a using statement to the Baz namespace (for Foo class and Bar enum).
- On the method in the implementing class, run the "Add XML Comments" on the method
- Observe that CodeRush inserts a broken version of the <see/> tag. In my example: /// <returns>A <see cref="Baz.Foo`1"/>.</returns>
- So the Bar generic parameter is lost, and Foo is unnecessarily fully qualified.

Comments (2)
PW PW
Przemyslaw Wlodarczak (DevExpress) 7 years ago

    Hi Ivan,

    Thank you for the report. I reproduced this issue. You will get notified when we fix it. Please bear with us.

      OK, good.

      Please also test the fix with the scenario <see cref="Foo{Bar, int}" /> (that is, more than one generic type parameter), since this also fails when I use the Add XML Comments operation.

      Best regards,
      Ivan Uthus

      Answers approved by DevExpress Support

      created 6 years ago

      We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

      Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.