dotnet_style_namespace_match_folder = false not work

Viewed 39

I use the latest VS 2022 (17.2.6)

I activated all code cleanup fixers

My .editorconfig contains

[*.cs]
dotnet_style_namespace_match_folder = false

My extension's class should be

namespace Microsoft.Extensions.DependencyInjection;

public static class ServiceCollectionExtensions
{
  public static IServiceCollection Add(this IServiceCollection services, ...)
  {
    ...

but when I clean up, the cleanup provide the following code :

namespace Product.Folder;

public static class ServiceCollectionExtensions
{
  public static IServiceCollection Add(this IServiceCollection services, ...)
  {
    ...

The only way is to deactivate the fixer named "Apply namespace matches folder preferences" in VS options, but I want to deactivate this rule only in some folders. Did I forget something?

0 Answers
Related