Bug Report T1182274
Visible to All Users

Register in VS does not show issues in the VS Error window

created 2 years ago

Repo:

  1. Click "Extensions -> CodeRush -> Options"
  2. Click "Editor -> C# -> Code Analysis -> Code Issues Catalog"
  3. Click on "Search" and type "unused"
  4. Make sure all rules have checkboxes checked for "Enabled" and "Register in VS"

Clipboard-File-1.png

  1. Click Apply and then OK
  2. Create a C# internal class with an unused member
  3. Open the VS Error window

EXPECTED: A message to that a unused type can be removed.

ACTUAL: Nothing

BTW: I've never seen this feature work.

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

    Dan,

    There can be two root causes for this behavior:

    • You have the "Build Only" filter selected in the Error List - change it to "Build + Intellisense".
    • You enabled the "Run code analysis in separate process" setting on the Tools->Options…->Text Editor->C#->Advanced option page. As a workaround, either disable this setting or use the Code Issues tool window that CodeRush supplies.

    Let me know if this helps.

      "Build + Intellisense" is selected.

      Clipboard-File-1.png

      I've unchecked "Run code analysis in separate process"

      Clipboard-File-2.png

      I'm now seeing some CodeRush issues reported, but it still doesn't show me any unused member issues for the following code:

      Code
      internal class NotUsedClass { private int NotUsedProperty { get; set; } }

      Finally, I don't understand why "Run code analysis in separate process" needs to be unchecked. Why can't it run out of process like every other Roslyn analyzer?

      PW PW
      Przemyslaw Wlodarczak (DevExpress) 2 years ago

        Dan,

        I reproduced the missing Unused Member diagnostics in the Error List. I will investigate it and let you know my results.

        Regarding the "Run code analysis in separate process" setting, the MEF composition does not work in a separate process. We would need to manually work around this limitation (and few others), which simply does not exist when code is analyzed in the same process. This task is complex, resource consuming, and has a simple workaround. So, we do not plan to work on it.
        If you need to run code analysis in a separate process, just use the Code Issues tool window supplied by CodeRush instead of the built in Error List.

        Answers approved by DevExpress Support

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

          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.