Bug Report T422614
Visible to All Users

Code Cleanup - The 'Apply variable declaration style' provider shows an error message on specific code

created 8 years ago

When pressing Ctrl + .(period) and selecting Code Cleanup in a C# document I receive an error:
'CodeCleanUpProvider' encountered an error and has been disabled.

If I go to the CodeRush menu > Edit > Cleanup Document I get an message box with the error:
One or more errors occurred

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

    Hi Stephen,
    This error message usually means that there were errors while handling a document. Can you please send us a document where the error occurred along with your settings (CodeRush\Support\Settings Folder)? Log files can also shed some light on the nature of the issue (CodeRush\Support\CodeRush Logs). Thanks in advance.

    ST ST
    Stephen Tutton 8 years ago

      Here is a code file. I have identified the line that causes the issue. I have also attached my settings and log files.
      Thanks!

      C#
      using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CodeRushError { class CRCleanupError { public void CleanupError() { var myType = typeof(CRCleanupError); var myProps = myType.GetProperties(); // The GetProperties() call causes the error. Removing it fixes the problem. } } }
      AE AE
      Alex Eg (DevExpress) 8 years ago

        Stephen,
        Thank you for the provided information. I have reproduced the issue and we are working on it. We will update this ticket once we get results.

        Answers approved by DevExpress Support

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