Skip to content

Add diagnostics for init only properties#53520

Open
BillWagner wants to merge 7 commits intodotnet:mainfrom
BillWagner:init-properties-diagnostics
Open

Add diagnostics for init only properties#53520
BillWagner wants to merge 7 commits intodotnet:mainfrom
BillWagner:init-properties-diagnostics

Conversation

@BillWagner
Copy link
Copy Markdown
Member

@BillWagner BillWagner commented May 1, 2026

Fixes #52835

Add corrective information for diagnostics related to init only properties.

In addition, do another search for consolidation opportunities.


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/compiler-messages/property-declaration-errors.md Errors and warnings related to property declarations
docs/csharp/language-reference/toc.yml docs/csharp/language-reference/toc
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Coming in C# 15

Make sure the error messages in the doc match the roslyn source.
Review and do a final copyedit.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses missing documentation for C# init-only property diagnostics by consolidating several compiler error pages into the existing property declaration diagnostics article, and updating routing/navigation so the affected error codes land on the consolidated guidance instead of the generic “no specifics” page.

Changes:

  • Add corrective guidance for init-only property diagnostics (CS8852, CS8853, CS8855, CS8856, and CS8903) to the consolidated property declaration errors article.
  • Consolidate multiple legacy per-error pages into the consolidated article, remove the old pages, and add redirects for the removed URLs.
  • Update the C# language reference TOC and the “no specifics” page keywords to point users to the consolidated content.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Removes f1 keywords for diagnostics now covered by the consolidated property-declaration article.
docs/csharp/misc/cs1715.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0610.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0548.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0547.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0546.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0544.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0442.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0276.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0275.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0274.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/misc/cs0273.md Removes legacy per-error page (now redirected to consolidated guidance).
docs/csharp/language-reference/toc.yml Updates TOC keywords and removes entries for removed per-error pages.
docs/csharp/language-reference/compiler-messages/property-declaration-errors.md Expands consolidated guidance (including init-only diagnostics) and adds keywords for routing.
.openpublishing.redirection.csharp.json Adds redirects from removed per-error pages to the consolidated property-declaration article.

Comment thread docs/csharp/language-reference/compiler-messages/property-declaration-errors.md Outdated
Comment thread docs/csharp/language-reference/compiler-messages/property-declaration-errors.md Outdated
Comment thread docs/csharp/language-reference/compiler-messages/property-declaration-errors.md Outdated
Comment thread docs/csharp/language-reference/compiler-messages/property-declaration-errors.md Outdated
BillWagner and others added 3 commits May 1, 2026 11:05
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Reword one recommendation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C# 9 diagnostics] init only properties

2 participants