Bug Report T1266846
Visible to All Users

CodeRush 24.1.5 causes an error in the 'Diagnostic analyzer runner' when using Visual Studio 17.12.3

created 3 months ago

Visual Studio v17.12.3 with CodeRush v24.1.5 installed shows a notification about an exception in the 'Diagnostic analyzer runner'.

This issue is not reproducible without CodeRush or in previous versions of Visual Studio.

Clipboard-File-1.png

Show previous comments (5)

    Hello, Alex,

    Yes, I ensured version 24.1.5.24311 was installed by checking in the About Box and in the extension manager. In both places it shows 24.1.5.24311. Just checking now, I noticed the problem only happens with one of the solutions I'm working on. On two other solutions I opened, the issue does not occur. I tried to see if there was something in this one solution that could be causing the issue, but aside from the actual code, all three solutions have the same .editorconfig file, the same structure, roughly the same number of projects, the same base files, etc. So I couldn't see anything that would stand out as a cause. I looked at the CodeRush logs when opening the solution with the issue and a solution without the issue, but again, they look the same. Nothing stands out in the logs. The only difference I can think of is that the solution where the issue occurs, is a much bigger and more complex solution with a much larger amount of classes and files, than the other two solutions.

    In the project where the issue occurs, if I disable the CodeRush extension, the problem goes away. If I deactivate the option TextEditor->C#->Advanced->Run code analysis in separate process with CodeRush enabled, the problem goes away. With this last option activated, the error occurs when I do anything in the solution: open a new file, switch to a new tab, close a file, etc.

    Let me know if there is anything I can do to help you further diagnose this issue.

      For some reason, one of the solutions I'm working on that did not exhibit the issue earlier is now also showing the error. I re-enabled the option TextEditor->C#->Advanced->Run code analysis in separate process as I decided to test CodeRush's spell checker again to see if I switch back from Visual Studio's spell checker, and it was not working, so I re-enabled this setting for testing. When I re-enabled the option, the CodeRush spell checker started working, but now I'm getting the error discussed here. I have been refactoring this solution all day, so there have been a lot of code changes but no configuration-related changes. Something I changed in the solution is now triggering the issue.

      The third solution, which I haven't modified since I tested this issue earlier, still doesn't exhibit this problem.

      On a separate unrelated note, the spell checker doesn't work unless I enable the option TextEditor->C#->Advanced->Run code analysis in a separate process which is contrary to what the docs tell you to do when you want to enable the spell checker. It shows the squiggly line, but the context menu doesn't show any spelling-related options. If I enable this option, everything related to the spell checker works. Just mentioning it here in case it relates to this issue (or if you want to look more into this).

      On further testing on the third solution, if I set the analysis scope in VS to "Entire Solution" I will get the error after a second or two. But if I open all the files and set the analysis scope to "Open Documents" I don't.

      I went back to the other two solutions and checked the scope. On the first solution, it was set to "Entire Solution". On the second solution, I changed it while testing the spell checker so I believe the error started then. If I set the analysis scope to "Current Document" I'm no longer getting the error on either solution. So, it seems it has to do something with the "Entire Solution" analysis scope.

      The error is also triggered if I select "Run Code Analysis on Solution".

      AE AE
      Alex Eg (DevExpress) 2 months ago

        Arturo,

        Thank you so much for your detailed research. While the issue looks similar to the one reported in this ticket, we decided to create another ticket because it has different reproduction steps. We will continue our research in the following ticket:
        CodeRush causes an error in 'Diagnostic analyzer runner' when Visual Studio 17.12.3 is used and the code analysis scope is set to 'Solution'

        Answers approved by DevExpress Support

        created 3 months ago

        We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

        Important Notes:

        • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
        • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
          Show previous comments (3)
          O O
          Olivier Jacot-Descombes 2 months ago

            The error still occurs in 24.2.3.0 whenever I open a code file with the following settings:

            • Run background code analysis for: Entire solution.
            • Run code analysis in a separate process: true.
            AE AE
            Alex Eg (DevExpress) 2 months ago

              Hi Olivier,

              • Run background code analysis for: Entire solution.

              We will continue researching this case in the following ticket:
              CodeRush causes an error in 'Diagnostic analyzer runner' when Visual Studio 17.12.3 is used and the code analysis scope is set to 'Solution'

              AE AE
              Alex Eg (DevExpress) 2 months ago

                We fixed the issue with code analysis. The hotfix build is ready for download:
                https://downloads.devexpress.com/HotFixes/CodeRush/v24.2/DevExpress.CodeRush-24.2.3.24351.exe

                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.