.NET project file analyzers community

Proj0025: Migrate from ruleset file to .editorconfig file

Microsoft deprecated the use of .ruleset’s in favour of .editorconfig files. In Visual Studio by clicking the file, it will automatically pop up a dialog to convert the ruleset.

Alternatively, you can download the converter yourself from NuGet.

For more info: [learn.microsoft.com])https://learn.microsoft.com/visualstudio/code-quality/use-roslyn-analyzers?view=vs-2022#convert-an-existing-ruleset-file-to-editorconfig-file)

Non-compliant

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <CodeAnalysisRuleSet>MyPreferences.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>

</Project>

Compliant

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
  
  <ItemGroup Label="Analyzer configuration">
    <GlobalAnalyzerConfigFiles Include="analyzers-config.ini" />
  </ItemGroup>
  
</Project>