-
Notifications
You must be signed in to change notification settings - Fork 6.1k
File scoped namespace diagnostics #51559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fixes dotnet#51445 Add the diagnostics that currently have no documentation to this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Consolidates documentation for compiler diagnostics related to using directives, aliases, and file-scoped namespaces by moving previously separate error pages into a single “using directive errors” article and updating navigation/redirects accordingly.
Changes:
- Expanded
using-directive-errors.mdto include additional diagnostics (file-scoped namespace, extern alias, global using, alias restrictions). - Removed several older per-error
docs/csharp/misc/cs*.mdpages and added redirects to the consolidated article. - Updated TOC and a related WinForms compatibility doc to point at the consolidated content.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md | Removes error codes that are now documented elsewhere. |
| docs/csharp/misc/cs2034.md | Removes standalone CS2034 page (now consolidated). |
| docs/csharp/misc/cs1730.md | Removes standalone CS1730 page (now consolidated). |
| docs/csharp/misc/cs1681.md | Removes standalone CS1681 page (now consolidated). |
| docs/csharp/misc/cs1680.md | Removes standalone CS1680 page (now consolidated). |
| docs/csharp/misc/cs1679.md | Removes standalone CS1679 page (now consolidated). |
| docs/csharp/misc/cs1671.md | Removes standalone CS1671 page (now consolidated). |
| docs/csharp/misc/cs0439.md | Removes standalone CS0439 page (now consolidated). |
| docs/csharp/misc/cs0430.md | Removes standalone CS0430 page (now consolidated). |
| docs/csharp/language-reference/toc.yml | Updates navigation and display keywords to match consolidation. |
| docs/csharp/language-reference/compiler-messages/using-directive-errors.md | Adds/rewrites content to cover additional diagnostics and guidance. |
| docs/csharp/language-reference/compiler-messages/snippets/UsingDirectives/UsingDirective.csproj | Removes snippet project (article no longer references these snippet includes). |
| docs/csharp/language-reference/compiler-messages/snippets/UsingDirectives/UnsafeExamples.cs | Removes snippet source file (no longer referenced). |
| docs/csharp/language-reference/compiler-messages/snippets/UsingDirectives/Program.cs | Removes snippet source file (no longer referenced). |
| docs/csharp/language-reference/compiler-messages/snippets/UsingDirectives/MyClass.cs | Removes snippet source file (no longer referenced). |
| docs/core/compatibility/windows-forms/10.0/menuitem-contextmenu.md | Updates cross-link to consolidated using/alias guidance. |
| .openpublishing.redirection.csharp.json | Adds redirects from removed per-error pages to the consolidated article. |
docs/csharp/language-reference/compiler-messages/using-directive-errors.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/using-directive-errors.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/using-directive-errors.md
Show resolved
Hide resolved
docs/core/compatibility/windows-forms/10.0/menuitem-contextmenu.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/using-directive-errors.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/using-directive-errors.md
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/using-directive-errors.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/using-directive-errors.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ve-errors.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fixes #51445
Add the undocumented diagnostics related to file-scoped namespace declarations.
While working in this area, pick up the undocumented errors related to global usings and other aliases.
Finally, do a complete edit pass to focus more on resolving the issues than describing them.
Internal previews