Skip to content

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

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

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

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

Backport of #55899 to release/11.0.1xx

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

RC2 backport approval has been obtained. The servicing-approved label still needs to be recorded on this PR.

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 the inspected .NET 11 RC1 package. 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 and .NET 11 RC1 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/11.0.1xx (6c212bd46ff54b103f32a6ab3e3c4ba7e8c677e1), 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. Clean-package and consumer validation are important to establish the restored behavior.

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
@github-actions github-actions Bot added the backport PR that has been backported to a servicing branch label Sep 15, 2026
@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.

@tannergooding

tannergooding commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

The corresponding 10.0.4xx and 10.0.1xx backports also exist:

Is the backport process for them the same as for other 10.0 repos? That is, I'll need to just send a mail to tactics after getting appropriate M2 sign-off?

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

Customer reported regression. Approved. Yes, Tactics for backports.

@tannergooding
tannergooding merged commit d123f8f into release/11.0.1xx Sep 17, 2026
20 of 21 checks passed
@tannergooding
tannergooding deleted the backport/pr-55899-to-release/11.0.1xx branch September 17, 2026 19:52
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc2 milestone Sep 21, 2026
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.

4 participants