Skip to content

rulesets subdirectory missing from published NetAnalyzers nupkg #54046

@gt-dbechtold

Description

@gt-dbechtold

Describe the bug

"rulesets" subdirectory (and contents) are missing from published Microsoft.CodeAnalysis.NetAnalyzers packages for versions 10.*.

To Reproduce

I looked through many different 10.x versions of the nuget package, but did not see the "rulesets" subdirectory. On the other hand, I see the "rulesets" subdirectory in the 9.0.0 package version.

Although the "rulesets" directory is not present in the published NuGet package, the "rulesets" directory exists when I build the NuGet package locally on Windows using Visual Studio 2026:

  • Clone this dotnet/sdk repository.
  • Check out branch release/10.0.2xx.
  • Open src\Microsoft.CodeAnalysis.NetAnalyzers\Microsoft.CodeAnalysis.NetAnalyzers.slnx in Visual Studio (I used VS 2026 18.4.3).
  • Change solution configuration to "Release".
  • Right click on Microsoft.CodeAnalysis.NetAnalyzers.Package project and select Pack. Wait for packing to complete.
  • Using File Explorer, go look in "Microsoft.CodeAnalysis.NetAnalyzers.10.0.202-dev.nupkg" archive under artifacts\packages\Release\Shipping directory on disk (relative to repository root directory).
  • The "rulesets" subdirectory exists here. Why isn't it in the NuGet package published on nuget.org??

Remarks

I maintain an application that makes use of the ruleset files, so I am dismayed to find them missing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions