Skip to content

Restore generated assets in Microsoft.CodeAnalysis.NetAnalyzers packages - #55899

Open
jeffhandley with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-rulesets-subdirectory-issue
Open

Restore generated assets in Microsoft.CodeAnalysis.NetAnalyzers packages#55899
jeffhandley with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-rulesets-subdirectory-issue

Conversation

Copilot AI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Clean one-pass packing evaluated generated-file globs before their outputs existed, omitting rulesets, editorconfigs, global analyzer configs, and buildTransitive integration files. This also prevented package-provided analyzers such as CA1416 from receiving required MSBuild properties.

  • Correct pack ordering
    • Move generated-file inclusion into a target that runs after asset generation and before NuGet gathers package files.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
3 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI and others added 3 commits August 23, 2026 21:40
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing rulesets subdirectory in published NetAnalyzers package Restore generated assets in Microsoft.CodeAnalysis.NetAnalyzers packages Aug 23, 2026
Copilot AI requested a review from jeffhandley August 23, 2026 21:54
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1b62fb4f-3669-466b-bbcf-d0384626535c
@jeffhandley
jeffhandley marked this pull request as ready for review August 24, 2026 05:35
@jeffhandley
jeffhandley requested a review from a team as a code owner August 24, 2026 05:35
@jeffhandley
jeffhandley requested review from ViktorHofer and a lite review from Copilot August 24, 2026 05:35
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the Microsoft.CodeAnalysis.NetAnalyzers package packing process so generated assets (rulesets, editorconfigs, global analyzer configs, and buildTransitive integration files) are included reliably by moving their inclusion from evaluation-time globs to a target that runs after generation and before NuGet collects package files.

Changes:

  • Removed evaluation-time <None Include=".../**/*" Pack="true" ... /> entries that could be empty during a clean pack.
  • Added IncludeGeneratedFilesInPackage target to inject the generated files into the packing item graph after GenerateAnalyzerConfigAndDocumentationFiles runs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1b62fb4f-3669-466b-bbcf-d0384626535c

@ViktorHofer ViktorHofer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We noticed the same just last week. Thanks for fixing. Interestingly this did work before so something must have changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants