Skip to content

[release/10.0.1xx] Restore generated assets in Microsoft.CodeAnalysis.NetAnalyzers packages - #56310

Merged
tannergooding merged 6 commits into
release/10.0.1xxfrom
backport/pr-55899-to-release/10.0.1xx
Sep 22, 2026
Merged

tannergooding merged 6 commits into
release/10.0.1xxfrom
backport/pr-55899-to-release/10.0.1xx

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #55899 to release/10.0.1xx

Collect generated rulesets, editorconfigs, global analyzer configs, and MSBuild integration files after generation and before NuGet gathers package files.

.NET 10 servicing approval is pending; the separate RC2 approval does not cover this backport.

Customer Impact

  • Customer reported
  • Found internally

Published analyzer NuGet packages omit generated configuration and buildTransitive assets during clean one-pass packing. Direct-package consumers can silently lose expected diagnostics because analyzers do not receive required configuration/MSBuild properties, including inputs used by CA1416. Missing assets were confirmed in sampled .NET 10 packages, including 10.0.112 and 10.0.401. SDK-inbox integration copies these assets separately.

Reported in #54046 and #53125.

Regression

  • Yes
  • No

The generated assets are present in inspected earlier packages, including 9.0.0, but absent from sampled .NET 10 packages. Generated-file globs were evaluated before their outputs existed.

Testing

The exact main-merge patch was applied to an isolated index based on release/10.0.1xx (8fcdf05e3df59cb315e35e9a2ac53126d31d7ce4), without conflicts or whitespace errors. The backport workflow completed successfully.

No new regression tests are included in the source change. Release-branch CI, clean one-pass package-content inspection, and consumer validation remain pending. Validation should cover the expected rulesets, editorconfig, and buildTransitive assets, direct-package CA1416 analysis with inbox analyzers disabled, and the normal SDK-inbox path. Patch application is not a package-build or consumer-test result.

Risk

The change is limited to package asset collection timing in one project file; analyzer algorithms and default severities are unchanged. Restoring missing integration can surface previously missing diagnostics for package consumers, including build failures when warnings are elevated to errors. This compatibility impact requires separate .NET 10 servicing consideration and clean-package/consumer validation.

Note

This PR description was drafted with GitHub Copilot.

Copilot AI and others added 6 commits September 15, 2026 20:03
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>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1b62fb4f-3669-466b-bbcf-d0384626535c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1b62fb4f-3669-466b-bbcf-d0384626535c
@github-actions github-actions Bot added the backport PR that has been backported to a servicing branch label Sep 15, 2026
@github-actions
github-actions Bot requested a review from a team as a code owner September 15, 2026 20:03
@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.

@artl93 artl93 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.

Approved for me.

@rbhanda rbhanda added this to the 10.0.13 milestone Sep 21, 2026
@tannergooding
tannergooding merged commit e5a04cc into release/10.0.1xx Sep 22, 2026
24 of 25 checks passed
@tannergooding
tannergooding deleted the backport/pr-55899-to-release/10.0.1xx branch September 22, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PR that has been backported to a servicing branch Servicing-approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants