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)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<CodeAnalysisRuleSet>MyPreferences.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup Label="Analyzer configuration">
<GlobalAnalyzerConfigFiles Include="analyzers-config.ini" />
</ItemGroup>
</Project>