Skip to content

Add missing diagnostics for target-typed new and source generators#53867

Open
BillWagner wants to merge 11 commits into
dotnet:mainfrom
BillWagner:source-generator-diagnostics
Open

Add missing diagnostics for target-typed new and source generators#53867
BillWagner wants to merge 11 commits into
dotnet:mainfrom
BillWagner:source-generator-diagnostics

Conversation

The Source generator errors were already covered in the article, but weren't present in the front matter.
Search for other related daignosticss that haven't het been added.
Incorporate new diagnostics in the consolidated sections.
Align messages with the roslyn output.
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

Closes the gap for several previously undocumented C# diagnostics by adding a new article covering new/object-creation errors (CS0144, CS0712, CS1526, CS8181, CS8386, CS8752, CS8753, CS8754) and expanding the source generator/analyzer errors article with CS8032–CS8040, CS8700, CS8784/CS8785, and CS8850. Old per-error stub pages are removed (with redirects added), and the f1 keyword landing page and TOC are updated accordingly.

Changes:

  • Add new compiler-messages article for new expressions and object creation, and expand the source generator article with analyzer/source-generator compatibility and source generator failure sections.
  • Remove obsolete CS0144/CS0712/CS1526 misc stubs, update toc.yml, and add redirects in .openpublishing.redirection.csharp.json.
  • Remove migrated f1_keywords entries from the "sorry, we don't have specifics" landing page.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/csharp/language-reference/compiler-messages/new-and-object-creation-errors.md New article documenting eight new-related diagnostics.
docs/csharp/language-reference/compiler-messages/source-generator-errors.md Adds analyzer/SG compatibility and SG failure sections covering CS8032–CS8850.
docs/csharp/language-reference/toc.yml Adds new TOC entry; removes entries for deleted misc pages; expands SG displayName.
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Removes f1 keywords now covered by the new articles.
docs/csharp/misc/cs0144.md, cs0712.md, cs1526.md Deleted in favor of the consolidated article.
.openpublishing.redirection.csharp.json Adds redirects for the three deleted pages.

@BillWagner BillWagner marked this pull request as ready for review May 15, 2026 17:59
@BillWagner BillWagner requested a review from a team as a code owner May 15, 2026 17:59
Fix filename and dead links.
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# diagnostics] - Errors and warnings for target type new, source generators

3 participants