Skip to content

Commit f3c00fd

Browse files
Merge pull request #49043 from dotnet/main
Merge main into live
2 parents 0b6bb93 + 905d0e3 commit f3c00fd

File tree

89 files changed

+853
-873
lines changed

Some content is hidden

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

89 files changed

+853
-873
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copilot prompts to consolidate error codes.
2+
3+
## Add a single existing file into the new consolidated article.
4+
5+
Add the contents of cs1027.md to the preprocessor-errors.md file, sort that file by 'source_path_from_root'. Add a redirection for cs1027.md to point to preprocessor-errors.md, add "cs1027: to the list of display names in the TOC for preprocessor-errors.md. Finally, delete cs1027.md
6+
7+
## Search for other related articles that may be missed.
8+
9+
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 preprocessor tokens. Give me a list to review for possible additional consolidation.
10+
11+
## Final search in roslyn source
12+
13+
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 not already added to preprocessor-errors.md
14+
15+
## Build consolidated sections
16+
17+
Examine the highlighted section. Other H2s with similar themes should be combined in a similar format. The recommendations to fix the errors should point to language reference articles that explain the impacted syntax.
18+
19+
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.
20+
21+
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.
22+
23+
Start with CS1024 and other errors that indicate "Not a valid preprocessor directive"

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ jobs:
7171

7272
# Upload the results to GitHub's code scanning dashboard.
7373
- name: "Upload to code-scanning"
74-
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
74+
uses: github/codeql-action/upload-sarif@e296a935590eb16afc0c0108289f68c87e2a89a5 # v3.29.5
7575
with:
7676
sarif_file: results.sarif

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
egress-policy: audit
2222

23-
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f
23+
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008
2424
with:
2525
start-date: '2022-03-01T00:00:00Z' # ISO 8601 or RFC 2822
2626
repo-token: ${{ secrets.GITHUB_TOKEN }}

.openpublishing.redirection.csharp.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@
363363
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs1683.md",
364364
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/assembly-references"
365365
},
366+
{
367+
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs1691.md",
368+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
369+
},
366370
{
367371
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs0270.md",
368372
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/array-declaration-errors"
@@ -1834,6 +1838,70 @@
18341838
"source_path_from_root": "/docs/csharp/misc/cs1020.md",
18351839
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overload-resolution"
18361840
},
1841+
{
1842+
"source_path_from_root": "/docs/csharp/misc/cs1024.md",
1843+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1844+
},
1845+
{
1846+
"source_path_from_root": "/docs/csharp/misc/cs1025.md",
1847+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1848+
},
1849+
{
1850+
"source_path_from_root": "/docs/csharp/misc/cs1027.md",
1851+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1852+
},
1853+
{
1854+
"source_path_from_root": "/docs/csharp/misc/cs1028.md",
1855+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1856+
},
1857+
{
1858+
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs1029.md",
1859+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1860+
},
1861+
{
1862+
"source_path_from_root": "/docs/csharp/misc/cs1030.md",
1863+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1864+
},
1865+
{
1866+
"source_path_from_root": "/docs/csharp/misc/cs1032.md",
1867+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1868+
},
1869+
{
1870+
"source_path_from_root": "/docs/csharp/misc/cs1038.md",
1871+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1872+
},
1873+
{
1874+
"source_path_from_root": "/docs/csharp/misc/cs1040.md",
1875+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1876+
},
1877+
{
1878+
"source_path_from_root": "/docs/csharp/misc/cs1517.md",
1879+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1880+
},
1881+
{
1882+
"source_path_from_root": "/docs/csharp/misc/cs1560.md",
1883+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1884+
},
1885+
{
1886+
"source_path_from_root": "/docs/csharp/misc/cs1576.md",
1887+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1888+
},
1889+
{
1890+
"source_path_from_root": "/docs/csharp/misc/cs1578.md",
1891+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1892+
},
1893+
{
1894+
"source_path_from_root": "/docs/csharp/misc/cs1633.md",
1895+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1896+
},
1897+
{
1898+
"source_path_from_root": "/docs/csharp/misc/cs1634.md",
1899+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1900+
},
1901+
{
1902+
"source_path_from_root": "/docs/csharp/misc/cs1635.md",
1903+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
1904+
},
18371905
{
18381906
"source_path_from_root": "/docs/csharp/misc/cs1100.md",
18391907
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/extension-declarations"
@@ -1994,10 +2062,30 @@
19942062
"source_path_from_root": "/docs/csharp/misc/cs1686.md",
19952063
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#syntax-limitations-in-lambda-expressions"
19962064
},
2065+
{
2066+
"source_path_from_root": "/docs/csharp/misc/cs1692.md",
2067+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
2068+
},
2069+
{
2070+
"source_path_from_root": "/docs/csharp/misc/cs1694.md",
2071+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
2072+
},
2073+
{
2074+
"source_path_from_root": "/docs/csharp/misc/cs1695.md",
2075+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
2076+
},
2077+
{
2078+
"source_path_from_root": "/docs/csharp/misc/cs1696.md",
2079+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
2080+
},
19972081
{
19982082
"source_path_from_root": "/docs/csharp/misc/cs1706.md",
19992083
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#syntax-limitations-in-lambda-expressions"
20002084
},
2085+
{
2086+
"source_path_from_root": "/docs/csharp/misc/cs1709.md",
2087+
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/preprocessor-errors"
2088+
},
20012089
{
20022090
"source_path_from_root": "/docs/csharp/misc/cs1714.md",
20032091
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/assembly-references"

docs/ai/evaluation/snippets/evaluate-safety/EvaluateResponseSafety.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
13-
<PackageReference Include="Azure.Identity" Version="1.16.0" />
14-
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.9.0" />
13+
<PackageReference Include="Azure.Identity" Version="1.17.0" />
14+
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.9.1" />
1515
<PackageReference Include="Microsoft.Extensions.AI.Evaluation" Version="9.9.0" />
1616
<PackageReference Include="Microsoft.Extensions.AI.Evaluation.Reporting" Version="9.9.0" />
1717
<PackageReference Include="Microsoft.Extensions.AI.Evaluation.Safety" Version="9.5.0-preview.1.25265.7" />
1818
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.5.0-preview.1.25265.7" />
1919
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.9" />
2020
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.9" />
21-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
22-
<PackageReference Include="MSTest" Version="3.10.4" />
21+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
22+
<PackageReference Include="MSTest" Version="4.0.0" />
2323
</ItemGroup>
2424

2525
<ItemGroup>

docs/ai/quickstarts/snippets/mcp-client/MinimalMCPClient.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.5" />
12-
<PackageReference Include="Azure.Identity" Version="1.16.0" />
13-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.9.0" />
12+
<PackageReference Include="Azure.Identity" Version="1.17.0" />
13+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.9.1" />
1414
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.3-preview.1.25230.7" />
1515
<PackageReference Include="ModelContextProtocol" Version="0.1.0-preview.14" />
1616
</ItemGroup>

docs/ai/quickstarts/snippets/prompt-completion/openai/ExtensionsOpenAI.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.0-preview.1.25207.5" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.8" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.8" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.9" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.9" />
1414
</ItemGroup>
1515

1616
</Project>

docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeRateLimitingEmbedding/ConsoleAI.ConsumeRateLimitingEmbedding.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="OllamaSharp" Version="5.3.6" />
11+
<PackageReference Include="OllamaSharp" Version="5.4.7" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CustomEmbeddingsMiddle/ConsoleAI.CustomEmbeddingsMiddle.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-rc.1.25451.107" />
12-
<PackageReference Include="OllamaSharp" Version="5.4.4" />
13-
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.12.0" />
12+
<PackageReference Include="OllamaSharp" Version="5.4.7" />
13+
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.13.0" />
1414
<ProjectReference Include="..\AI.Shared\AI.Shared.csproj" />
1515
</ItemGroup>
1616

docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.FunctionalityPipelines/ConsoleAI.FunctionalityPipelines.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-rc.1.25451.107" />
12-
<PackageReference Include="OllamaSharp" Version="5.4.6" />
13-
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.12.0" />
12+
<PackageReference Include="OllamaSharp" Version="5.4.7" />
13+
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.13.0" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

0 commit comments

Comments
 (0)