Bug Report T398028
Visible to All Users

'Sort Namespace References' refactoring should respect Visual Studio's 'Place System namespace references first' option

created 9 years ago (modified 9 years ago)

When I use the Sort Namespace References on an unsorted list of using directives, I expect that the settings of Visual Studio get honored.
See screen shot.

Not setting the checkbox should sort all using directives alphabetically, regardless of the fact that they reference System.Foo or not.

Comments (3)
AE AE
Alex Eg (DevExpress) 9 years ago

    Hi Pierre,
    Let me take a moment and thank you for all the feedback you provided.
    CodeRush for Roslyn have their own setting for sorting System references - Options\Editor\Code Style\Namespace References, 'Place System references first':
    http://screencast.com/t/KfEUlMGqWs
    I agree that CodeRush for Roslyn should respect VS settings in this case and update a value for this option accordingly.

      Thank you Alex. I forgot to check in the CodeRush Options because of the _built in_ setting provided by Visual Studio.

      I see that I can specify which references to never remove.

      I've already posted another ticket (https://www.devexpress.com/Support/Center/Question/Details/T384558) where I complained that I did not want CodeRush to add references to System. Maybe this could be coupled with that. If System is not in this list, I don't want System to be added?

      AE AE
      Alex Eg (DevExpress) 9 years ago

        Hi Pierre,
        Thank you for the idea. We are planning to implement the requested functionality in terms of code styles, because not only Optmize/Sort Namespace references would be affected, but almost all functionality that adds namespace references to the code file.

        Answers approved by DevExpress Support

        created 9 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.