Search Unity

Question Roslyn Analyzer shows issues in Rider but not in Editor

Discussion in 'Editor & General Support' started by hugeandy, Aug 5, 2021.

  1. hugeandy

    hugeandy

    Joined:
    Nov 2, 2016
    Posts:
    131
    Hi all,

    Another (different) question about Roslyn Analyzers.

    Project layout:
    Code (CSharp):
    1.  
    2. Assets/
    3.     Scripts/
    4.       analyzers/
    5.          CustomAnalyzer.dll
    6.       OurScripts.asmdef
    7. Packages/
    8.     com.org.package/
    9.         Runtime/
    10.             PackageScript.cs
    11.  
    12.  
    We have a custom analyzer which raises errors which sits in Assets/Scripts/analyzers. We have an assembly definition file at Assets/Scipts/OurScripts.asmdef. The analyzer should only apply to our code, and it does (with an exception - see other post).

    In the editor console, there are no errors raised from any of the UPM packages in our project as expected. We can enter play mode because there are no errors. However, in Rider it highlights errors from within scripts in the packages. This is frustrating because it shows red squiggles under files in the solution explorer, and within the files, where these are not errors.

    Any ideas?

    Cheers,
    Andy
     
    Last edited: Jan 21, 2022
    Seromu and WinterboltGames like this.