Skip to content

Commit 16be0f6

Browse files
Merge pull request #49296 from dotnet/main
Merge main into live
2 parents e5c3d37 + 817cee9 commit 16be0f6

File tree

88 files changed

+1503
-1645
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1503
-1645
lines changed
Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,60 @@
11
# Copilot prompts to consolidate error codes.
22

3-
We're going to edit this file, string-literal.md, to contain information about all errors and warnings related to string and character literal declarations. I'll write prompts for specific tasks. Don't make any edits yet. In future prompts, the destination for new error and warning content is always this file.
3+
Overall steps:
44

5+
1. Make a new template, by hand.
6+
1. Add any new errors that should be added here.
7+
1. Consolidate existing errors, as identified by person.
8+
1. Run Copilot search for other existing errors that person may have missed.
9+
1. Search for missing errors.
510

611
## Add a single existing file into the new consolidated article.
712

8-
Start with CS1009.md as the source file.
9-
For each source file:
13+
We're going to work through a series of files consolidating errors and warnings related to declaring overloaded operators.
14+
15+
The destination for all these edits is the overloaded-operator-errors.md file. It already contains a skeleton for the final output.
16+
17+
For each source file I specify in this chat, you'll do the following tasks:
1018

1119
- Add the contents of the source file to the destination.md file.
12-
- Include the source error code in the YML header for `f1_keywords` and `helpviewer_keywords`.
20+
- Include the source error code in the YML header for f1_keywords and helpviewer_keywords.
1321
- Add an entry with an anchor for the error error code and its corresponding error message.
1422
- Add the contents of the source file as a new H2 in the destination file.
15-
- Add a redirection for the source file in the file `.openpublishing.redirection.csharp.json`. Make the destination point to destination file. Place the new entry in sorted order based on 'source_path_from_root'.
23+
- Add a redirection for the source file in the file .openpublishing.redirection.csharp.json. Make the destination point to destination file. Place the new entry in sorted order based on 'source_path_from_root'.
1624
- Update the TOC file:
1725
- Add the error code to the list of display names in the TOC for the destination file, sorted by numeric error code.
1826
- Remove the TOC entry for the source file.
19-
- Finally, delete the source markdown file.
27+
- Finally, delete the source markdown file.
2028

2129
## Search for other related articles that may be missed.
2230

23-
Search all files in the docs/csharp/language-reference/compiler-messages and the docs/csharp/misc folder for any other errors and warnings that involve string literals or constants. Give me a list to review for possible additional consolidation.
31+
Search all files in the docs/csharp/language-reference/compiler-messages and the docs/csharp/misc folder for any other errors and warnings that involve operator overloading. Give me a list to review for possible additional consolidation. Don't make any edits until the originating user approves.
2432

2533
## Final search in roslyn source
2634

35+
Let's check undocumented errors and the roslyn source for any missing errors. For every error code listed in "sorry-we-don-t-have-specifics-on-this-csharp-error.md" under the `f1_keywords` front matter, do the following:
36+
1. Find that number as a constant in `ErrorCodes.cs`.
37+
2. Locate the corresponding `data` element in CSharpResources.resx. The `name` atttribute should match the number of the constant.
38+
3. Read the error message found in the `<value>` element that is a child of that `<data>` element.
39+
Give me a list of all error numbers and corresponding error messages that relate to operator overloading.
40+
2741
To make sure you've found all related errors, we'll check the source. Look in `CSharpResources.resx` for any elements where the `<value>` element is a message related to preprocessor tokens. The symbolic constant for that value is in the `name` attribute on the parent `data` element. Find that value in `ErrorCodes.cs`. It will map to the compiler error code, where the code is "CS" followed by the number as a four digit number. Build a list of any related errors, but don't make any edits yet.
2842

29-
For each new file:
43+
I'll give you error codes one by one. For each, I want you to do the following:
3044

31-
- Add the new error code to the front matter of the consolidated article, for both the `f1_keywords` and `helpview_keywords` table.
32-
- Add the new error code and error message to the table at the top of the destination article.
33-
- Add the new error code to the list of `displaName` elements in the TOC file.
45+
- Add the new error code to the front matter of operator-overloading-errors.md, for both the `f1_keywords` and `helpview_keywords` table.
46+
- Add the new error code and error message to the table at the top of operator-overloading-errors.md.
47+
- Add the new error code to the list of `displayName` elements in the TOC file for operator-overloading-errors.md.
3448
- Remove the new error code from the front matter in the file `csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-errors.md` file.
3549

3650
Note that no redirections need to be added for these error codes.
3751

3852
## Build consolidated sections
3953

40-
For all remaining work, all edits will be in the `string-literal.md` file. The final format should mirror the structure of the `preprocessor-errors.md` file. Every H2 is a theme, all anchors are for the theme, not an individual error code.
54+
For all remaining work, all edits will be in the `overloaded-operator-errors.md` file. The final format should mirror the structure of the `preprocessor-errors.md` file. Every H2 is a theme, all anchors are for the theme, not an individual error code.
4155

4256
To do that, make a new H2 section for the theme. Remove all the H2s for the individual error codes that are part of that theme. Where applicable, the new H2 can include text or examples from the H2s you remove. The new section should include links to language reference articles that discuss the feature or theme.
4357

4458
The list of errors at the top of the file should remain in numerical order, so it's easy for readers to scan. Each impacted error code should now have a link to the anchor tag for the new section. Repeat the list in the new section, but without the anchors, as shown in the highlighted text.
4559

46-
Start with the section for all errors related to raw string literals.
60+
Understand these instructions, then suggest a list of themes and the included error codes. I'll approve each theme before you begin editing.

.openpublishing.redirection.csharp.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,14 @@
359359
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs0270.md",
360360
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/array-declaration-errors"
361361
},
362+
{
363+
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs0552.md",
364+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
365+
},
366+
{
367+
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs0563.md",
368+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
369+
},
362370
{
363371
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs0650.md",
364372
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/array-declaration-errors"
@@ -1549,6 +1557,14 @@
15491557
"source_path_from_root": "/docs/csharp/misc/cs0035.md",
15501558
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/array-declaration-errors"
15511559
},
1560+
{
1561+
"source_path_from_root": "/docs/csharp/misc/cs0056.md",
1562+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1563+
},
1564+
{
1565+
"source_path_from_root": "/docs/csharp/misc/cs0057.md",
1566+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1567+
},
15521568
{
15531569
"source_path_from_root": "/docs/csharp/misc/cs0105.md",
15541570
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors"
@@ -1589,6 +1605,22 @@
15891605
"source_path_from_root": "/docs/csharp/misc/cs0206.md",
15901606
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"
15911607
},
1608+
{
1609+
"source_path_from_root": "/docs/csharp/misc/cs0215.md",
1610+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1611+
},
1612+
{
1613+
"source_path_from_root": "/docs/csharp/misc/cs0216.md",
1614+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1615+
},
1616+
{
1617+
"source_path_from_root": "/docs/csharp/misc/cs0217.md",
1618+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1619+
},
1620+
{
1621+
"source_path_from_root": "/docs/csharp/misc/cs0218.md",
1622+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1623+
},
15921624
{
15931625
"source_path_from_root": "/docs/csharp/misc/cs0225.md",
15941626
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/params-arrays"
@@ -1649,6 +1681,10 @@
16491681
"source_path_from_root": "/docs/csharp/misc/cs0440.md",
16501682
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors"
16511683
},
1684+
{
1685+
"source_path_from_root": "/docs/csharp/misc/cs0448.md",
1686+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1687+
},
16521688
{
16531689
"source_path_from_root": "/docs/csharp/misc/cs0457.md",
16541690
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overload-resolution"
@@ -1685,6 +1721,74 @@
16851721
"source_path_from_root": "/docs/csharp/misc/cs0526.md",
16861722
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/constructor-errors#constructor-declarations"
16871723
},
1724+
{
1725+
"source_path_from_root": "/docs/csharp/misc/cs0553.md",
1726+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1727+
},
1728+
{
1729+
"source_path_from_root": "/docs/csharp/misc/cs0554.md",
1730+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1731+
},
1732+
{
1733+
"source_path_from_root": "/docs/csharp/misc/cs0555.md",
1734+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1735+
},
1736+
{
1737+
"source_path_from_root": "/docs/csharp/misc/cs0556.md",
1738+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1739+
},
1740+
{
1741+
"source_path_from_root": "/docs/csharp/misc/cs0557.md",
1742+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1743+
},
1744+
{
1745+
"source_path_from_root": "/docs/csharp/misc/cs0558.md",
1746+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1747+
},
1748+
{
1749+
"source_path_from_root": "/docs/csharp/misc/cs0559.md",
1750+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1751+
},
1752+
{
1753+
"source_path_from_root": "/docs/csharp/misc/cs0562.md",
1754+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1755+
},
1756+
{
1757+
"source_path_from_root": "/docs/csharp/misc/cs0564.md",
1758+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1759+
},
1760+
{
1761+
"source_path_from_root": "/docs/csharp/misc/cs0567.md",
1762+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1763+
},
1764+
{
1765+
"source_path_from_root": "/docs/csharp/misc/cs0590.md",
1766+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1767+
},
1768+
{
1769+
"source_path_from_root": "/docs/csharp/misc/cs0660.md",
1770+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1771+
},
1772+
{
1773+
"source_path_from_root": "/docs/csharp/misc/cs0661.md",
1774+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1775+
},
1776+
{
1777+
"source_path_from_root": "/docs/csharp/misc/cs0715.md",
1778+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1779+
},
1780+
{
1781+
"source_path_from_root": "/docs/csharp/misc/cs1037.md",
1782+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1783+
},
1784+
{
1785+
"source_path_from_root": "/docs/csharp/misc/cs1553.md",
1786+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1787+
},
1788+
{
1789+
"source_path_from_root": "/docs/csharp/misc/cs1554.md",
1790+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overloaded-operator-errors"
1791+
},
16881792
{
16891793
"source_path_from_root": "/docs/csharp/misc/cs0568.md",
16901794
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/constructor-errors#constructors-in-struct-types"

docs/core/extensions/logging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ The following code enables scopes for the console provider:
603603
HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
604604

605605
builder.Logging.ClearProviders();
606-
builder.Logging.AddConsole(options => options.IncludeScopes = true);
606+
builder.Logging.AddSimpleConsole(options => options.IncludeScopes = true);
607607

608608
using IHost host = builder.Build();
609609

docs/core/whats-new/dotnet-10/libraries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
title: What's new in .NET libraries for .NET 10
33
description: Learn about the updates to the .NET libraries for .NET 10.
44
titleSuffix: ""
5-
ms.date: 09/09/2025
5+
ms.date: 10/15/2025
66
ai-usage: ai-assisted
77
ms.update-cycle: 3650-days
88
---
99

1010
# What's new in .NET libraries for .NET 10
1111

12-
This article describes new features in the .NET libraries for .NET 10. It's been updated for RC 1.
12+
This article describes new features in the .NET libraries for .NET 10. It's been updated for RC 2.
1313

1414
## Cryptography
1515

docs/core/whats-new/dotnet-10/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
title: What's new in .NET 10
33
description: Learn about the new features introduced in .NET 10 for the runtime, libraries, and SDK. Also find links to what's new in other areas, such as ASP.NET Core.
44
titleSuffix: ""
5-
ms.date: 09/09/2025
5+
ms.date: 10/15/2025
66
ai-usage: ai-assisted
77
ms.update-cycle: 3650-days
88
---
99

1010
# What's new in .NET 10
1111

12-
Learn about the new features in .NET 10 and find links to further documentation. This page has been updated for RC 1.
12+
Learn about the new features in .NET 10 and find links to further documentation. This page has been updated for RC 2.
1313

1414
.NET 10, the successor to [.NET 9](../dotnet-9/overview.md), is [supported for three years](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) as a long-term support (LTS) release. You can [download .NET 10 here](https://get.dot.net/10).
1515

docs/core/whats-new/dotnet-10/runtime.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: What's new in .NET 10 runtime
33
description: Learn about the new features introduced in the .NET 10 runtime.
44
titleSuffix: ""
5-
ms.date: 09/09/2025
5+
ms.date: 10/15/2025
66
ai-usage: ai-assisted
77
ms.update-cycle: 3650-days
88
---
99
# What's new in the .NET 10 runtime
1010

11-
This article describes new features and performance improvements in the .NET runtime for .NET 10. It's been updated for RC 1.
11+
This article describes new features and performance improvements in the .NET runtime for .NET 10. It's been updated for RC 2.
1212

1313
## JIT compiler improvements
1414

0 commit comments

Comments
 (0)