visual-studio-2019roslynator

Roslynator - how to disable C# 8.0 hints for .Net 4.7.2


I'm getting hints like "IDE0063 'using' statement can be simplified"

This is not a valid hint for a .Net 4.7.2 project. Why am I getting these?

===== Edit ======

Language Version Selection


Solution

  • Thanks to @hansPassant

    You can create a Directory.Build.props file that contains the element to configure multiple directories. You typically do that in your solution directory. Add the following to a Directory.Build.props file in your solution directory:

    <Project>
     <PropertyGroup>
       <LangVersion>7.3</LangVersion>
     </PropertyGroup>
    </Project>
    

    You should delete your .vs folder as this will have cached information that will prevent this from working.