From 89ce0c3ff88327aba4d08dd66a26a3e1b0abb4a8 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Mon, 30 Jun 2025 03:08:18 -0700
Subject: [PATCH 01/19] Update package index with latest published versions
(#46998)
---
docs/azure/includes/dotnet-all.md | 4 ++--
docs/azure/includes/dotnet-new.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md
index d65f0067bb86e..469a605ec9c64 100644
--- a/docs/azure/includes/dotnet-all.md
+++ b/docs/azure/includes/dotnet-all.md
@@ -1,6 +1,6 @@
| Name | Package | Docs | Source |
| ---- | ------- | ---- | ------ |
-| AI Agents Persistent | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Agents.Persistent-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.0.0/sdk/ai/Azure.AI.Agents.Persistent/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.1.0-beta.2/sdk/ai/Azure.AI.Agents.Persistent/) |
+| AI Agents Persistent | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.0.0)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/AI.Agents.Persistent-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.0.0/sdk/ai/Azure.AI.Agents.Persistent/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.1.0-beta.3/sdk/ai/Azure.AI.Agents.Persistent/) |
| AI Foundry | NuGet [1.0.0-beta.9](https://www.nuget.org/packages/Azure.AI.Projects/1.0.0-beta.9) | [docs](/dotnet/api/overview/azure/AI.Projects-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.9](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Projects_1.0.0-beta.9/sdk/ai/Azure.AI.Projects/) |
| AI Model Inference | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.AI.Inference/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/AI.Inference-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Inference_1.0.0-beta.5/sdk/ai/Azure.AI.Inference/) |
| Anomaly Detector | NuGet [3.0.0-preview.7](https://www.nuget.org/packages/Azure.AI.AnomalyDetector/3.0.0-preview.7) | [docs](/dotnet/api/overview/azure/AI.AnomalyDetector-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [3.0.0-preview.7](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AnomalyDetector_3.0.0-preview.7/sdk/anomalydetector/Azure.AI.AnomalyDetector/) |
@@ -59,7 +59,7 @@
| Image Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Vision.ImageAnalysis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Vision.ImageAnalysis_1.0.0/sdk/vision/Azure.AI.Vision.ImageAnalysis/) |
| Key Vault - Administration | NuGet [4.6.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.6.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Administration-readme) | GitHub [4.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.6.0/sdk/keyvault/Azure.Security.KeyVault.Administration/) |
| Key Vault - Certificates | NuGet [4.8.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.8.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Certificates-readme) | GitHub [4.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.8.0/sdk/keyvault/Azure.Security.KeyVault.Certificates/) |
-| Key Vault - Keys | NuGet [4.7.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.7.0)
NuGet [4.8.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.8.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.7.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.7.0/sdk/keyvault/Azure.Security.KeyVault.Keys/)
GitHub [4.8.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.8.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Keys/) |
+| Key Vault - Keys | NuGet [4.8.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.8.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.8.0/sdk/keyvault/Azure.Security.KeyVault.Keys/) |
| Key Vault - Secrets | NuGet [4.8.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.8.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Secrets-readme) | GitHub [4.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.8.0/sdk/keyvault/Azure.Security.KeyVault.Secrets/) |
| Language Text | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.AI.Language.Text/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/AI.Language.Text-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Text_1.0.0-beta.3/sdk/cognitivelanguage/Azure.AI.Language.Text/) |
| Load Testing | NuGet [1.0.2](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.2)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Developer.LoadTesting-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.2/sdk/loadtestservice/Azure.Developer.LoadTesting/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.2.0-beta.1/sdk/loadtestservice/Azure.Developer.LoadTesting/) |
diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md
index 9461fdb5b096e..317c231e76e6f 100644
--- a/docs/azure/includes/dotnet-new.md
+++ b/docs/azure/includes/dotnet-new.md
@@ -1,6 +1,6 @@
| Name | Package | Docs | Source |
| ---- | ------- | ---- | ------ |
-| AI Agents Persistent | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Agents.Persistent-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.0.0/sdk/ai/Azure.AI.Agents.Persistent/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.1.0-beta.2/sdk/ai/Azure.AI.Agents.Persistent/) |
+| AI Agents Persistent | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.0.0)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.AI.Agents.Persistent/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/AI.Agents.Persistent-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.0.0/sdk/ai/Azure.AI.Agents.Persistent/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Agents.Persistent_1.1.0-beta.3/sdk/ai/Azure.AI.Agents.Persistent/) |
| AI Foundry | NuGet [1.0.0-beta.9](https://www.nuget.org/packages/Azure.AI.Projects/1.0.0-beta.9) | [docs](/dotnet/api/overview/azure/AI.Projects-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.9](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Projects_1.0.0-beta.9/sdk/ai/Azure.AI.Projects/) |
| AI Model Inference | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.AI.Inference/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/AI.Inference-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Inference_1.0.0-beta.5/sdk/ai/Azure.AI.Inference/) |
| Anomaly Detector | NuGet [3.0.0-preview.7](https://www.nuget.org/packages/Azure.AI.AnomalyDetector/3.0.0-preview.7) | [docs](/dotnet/api/overview/azure/AI.AnomalyDetector-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [3.0.0-preview.7](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AnomalyDetector_3.0.0-preview.7/sdk/anomalydetector/Azure.AI.AnomalyDetector/) |
@@ -60,7 +60,7 @@
| Image Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Vision.ImageAnalysis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Vision.ImageAnalysis_1.0.0/sdk/vision/Azure.AI.Vision.ImageAnalysis/) |
| Key Vault - Administration | NuGet [4.6.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.6.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Administration-readme) | GitHub [4.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.6.0/sdk/keyvault/Azure.Security.KeyVault.Administration/) |
| Key Vault - Certificates | NuGet [4.8.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.8.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Certificates-readme) | GitHub [4.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.8.0/sdk/keyvault/Azure.Security.KeyVault.Certificates/) |
-| Key Vault - Keys | NuGet [4.7.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.7.0)
NuGet [4.8.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.8.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.7.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.7.0/sdk/keyvault/Azure.Security.KeyVault.Keys/)
GitHub [4.8.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.8.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Keys/) |
+| Key Vault - Keys | NuGet [4.8.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.8.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.8.0/sdk/keyvault/Azure.Security.KeyVault.Keys/) |
| Key Vault - Secrets | NuGet [4.8.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.8.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Secrets-readme) | GitHub [4.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.8.0/sdk/keyvault/Azure.Security.KeyVault.Secrets/) |
| Language Text | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.AI.Language.Text/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/AI.Language.Text-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Text_1.0.0-beta.3/sdk/cognitivelanguage/Azure.AI.Language.Text/) |
| Load Testing | NuGet [1.0.2](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.2)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Developer.LoadTesting-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.2/sdk/loadtestservice/Azure.Developer.LoadTesting/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.2.0-beta.1/sdk/loadtestservice/Azure.Developer.LoadTesting/) |
From b8ba46a2223c99f3dda81721b2b15bfa44e61efe Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 13:51:59 +0000
Subject: [PATCH 02/19] .NET dependabot-bot automated PR. (#47003)
Co-authored-by: BillWagner
---
.github/dependabot.yml | 132 ++++++++++++++++++++---------------------
1 file changed, 66 insertions(+), 66 deletions(-)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 0cb954e14ffec..1348358b06a0d 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -767,6 +767,17 @@ updates:
dotnet:
patterns:
- "*" # Prefer a single PR per solution update.
+ - package-ecosystem: "nuget"
+ directory: "/docs/ai/advanced/snippets/sample-implementations" #Implementations.csproj
+ schedule:
+ interval: "weekly"
+ day: "wednesday"
+ open-pull-requests-limit: 5
+ groups:
+ # Group .NET updates together for projects.
+ dotnet:
+ patterns:
+ - "*" # Prefer a single PR per project update.
- package-ecosystem: "nuget"
directory: "/docs/ai/how-to/snippets/content-filtering" #AIContentFiltering.csproj
schedule:
@@ -976,6 +987,17 @@ updates:
dotnet:
patterns:
- "*" # Prefer a single PR per project update.
+ - package-ecosystem: "nuget"
+ directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.AddMessages" #ConsoleAI.AddMessages.csproj
+ schedule:
+ interval: "weekly"
+ day: "wednesday"
+ open-pull-requests-limit: 5
+ groups:
+ # Group .NET updates together for projects.
+ dotnet:
+ patterns:
+ - "*" # Prefer a single PR per project update.
- package-ecosystem: "nuget"
directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CacheResponses" #ConsoleAI.CacheResponses.csproj
schedule:
@@ -998,6 +1020,28 @@ updates:
dotnet:
patterns:
- "*" # Prefer a single PR per project update.
+ - package-ecosystem: "nuget"
+ directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeRateLimitingEmbedding" #ConsoleAI.ConsumeRateLimitingEmbedding.csproj
+ schedule:
+ interval: "weekly"
+ day: "wednesday"
+ open-pull-requests-limit: 5
+ groups:
+ # Group .NET updates together for projects.
+ dotnet:
+ patterns:
+ - "*" # Prefer a single PR per project update.
+ - package-ecosystem: "nuget"
+ directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CreateEmbeddings" #ConsoleAI.CreateEmbeddings.csproj
+ schedule:
+ interval: "weekly"
+ day: "wednesday"
+ open-pull-requests-limit: 5
+ groups:
+ # Group .NET updates together for projects.
+ dotnet:
+ patterns:
+ - "*" # Prefer a single PR per project update.
- package-ecosystem: "nuget"
directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CustomClientMiddle" #ConsoleAI.CustomClientMiddle.csproj
schedule:
@@ -1042,6 +1086,28 @@ updates:
dotnet:
patterns:
- "*" # Prefer a single PR per project update.
+ - package-ecosystem: "nuget"
+ directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetResponseAsyncArgs" #ConsoleAI.GetResponseAsyncArgs.csproj
+ schedule:
+ interval: "weekly"
+ day: "wednesday"
+ open-pull-requests-limit: 5
+ groups:
+ # Group .NET updates together for projects.
+ dotnet:
+ patterns:
+ - "*" # Prefer a single PR per project update.
+ - package-ecosystem: "nuget"
+ directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetStreamingResponseAsync" #ConsoleAI.GetStreamingResponseAsync.csproj
+ schedule:
+ interval: "weekly"
+ day: "wednesday"
+ open-pull-requests-limit: 5
+ groups:
+ # Group .NET updates together for projects.
+ dotnet:
+ patterns:
+ - "*" # Prefer a single PR per project update.
- package-ecosystem: "nuget"
directory: "/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ProvideOptions" #ConsoleAI.ProvideOptions.csproj
schedule:
@@ -2131,69 +2197,3 @@ updates:
dotnet:
patterns:
- "*" # Prefer a single PR per project update.
- - package-ecosystem: "nuget"
- directory: "/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project" #MSTest.Project.csproj
- schedule:
- interval: "weekly"
- day: "wednesday"
- open-pull-requests-limit: 5
- groups:
- # Group .NET updates together for projects.
- dotnet:
- patterns:
- - "*" # Prefer a single PR per project update.
- - package-ecosystem: "nuget"
- directory: "/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject" #NUnit.Project.csproj
- schedule:
- interval: "weekly"
- day: "wednesday"
- open-pull-requests-limit: 5
- groups:
- # Group .NET updates together for projects.
- dotnet:
- patterns:
- - "*" # Prefer a single PR per project update.
- - package-ecosystem: "nuget"
- directory: "/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject" #XUnit.Project.csproj
- schedule:
- interval: "weekly"
- day: "wednesday"
- open-pull-requests-limit: 5
- groups:
- # Group .NET updates together for projects.
- dotnet:
- patterns:
- - "*" # Prefer a single PR per project update.
- - package-ecosystem: "nuget"
- directory: "/docs/core/testing/snippets/testcontext/csharp" #project.csproj
- schedule:
- interval: "weekly"
- day: "wednesday"
- open-pull-requests-limit: 5
- groups:
- # Group .NET updates together for projects.
- dotnet:
- patterns:
- - "*" # Prefer a single PR per project update.
- - package-ecosystem: "nuget"
- directory: "/docs/core/testing/snippets/unit-testing-using-mstest/csharp/PrimeService.Tests" #PrimeService.Tests.csproj
- schedule:
- interval: "weekly"
- day: "wednesday"
- open-pull-requests-limit: 5
- groups:
- # Group .NET updates together for projects.
- dotnet:
- patterns:
- - "*" # Prefer a single PR per project update.
- - package-ecosystem: "nuget"
- directory: "/docs/core/tutorials/snippets/library-with-visual-studio/csharp/StringLibraryTest" #StringLibraryTest.csproj
- schedule:
- interval: "weekly"
- day: "wednesday"
- open-pull-requests-limit: 5
- groups:
- # Group .NET updates together for projects.
- dotnet:
- patterns:
- - "*" # Prefer a single PR per project update.
From e14cd1c5a97f617d7a8041ecb9171520d82eb4fc Mon Sep 17 00:00:00 2001
From: Bill Wagner
Date: Mon, 30 Jun 2025 10:30:32 -0400
Subject: [PATCH 03/19] Language reference and fundamentals for file based
programs (#46900)
* publish spec and add preprocessor reference
First commit: Publish the C# speclet for ignored preprocessor directives, and make the updates for the ignored directives used for file based programs.
* Add file-based programs to get started
* Fix host location
And, set +x permissions on hello-world.cs
* Include file based programs in the structure
Include a description and small example of a file based program in the overview of the general structure of a C# program.
* Add file based programs to the command line
Add a brief description of file based programs in the command line section.
* Updates on top level statements
Final edits.
* Apply suggestions from code review
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: David Pine
* apply feedback.
---------
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: David Pine
---
docfx.json | 7 +-
.../fundamentals/program-structure/index.md | 25 +++-
.../program-structure/main-command-line.md | 107 +++++++-----------
.../file-based-program/hello-world.cs | 2 +
.../program-structure/top-level-statements.md | 4 +-
.../preprocessor-directives.md | 63 ++++++++++-
docs/csharp/specification/toc.yml | 2 +
docs/csharp/tour-of-csharp/overview.md | 18 ++-
.../file-based-programs/hello-world.cs | 2 +
9 files changed, 157 insertions(+), 73 deletions(-)
create mode 100644 docs/csharp/fundamentals/program-structure/snippets/file-based-program/hello-world.cs
create mode 100755 docs/csharp/tour-of-csharp/snippets/file-based-programs/hello-world.cs
diff --git a/docfx.json b/docfx.json
index 01e64d4904d34..06dd832df41a5 100644
--- a/docfx.json
+++ b/docfx.json
@@ -61,7 +61,8 @@
"partial-events-and-constructors.md",
"null-conditional-assignment.md",
"extensions.md",
- "user-defined-compound-assignment.md"
+ "user-defined-compound-assignment.md",
+ "ignored-directives.md"
],
"src": "_csharplang/proposals",
"dest": "csharp/language-reference/proposals",
@@ -533,7 +534,7 @@
"_csharplang/proposals/csharp-11.0/*.md": "09/30/2022",
"_csharplang/proposals/csharp-12.0/*.md": "08/15/2023",
"_csharplang/proposals/csharp-13.0/*.md": "10/31/2024",
- "_csharplang/proposals/*.md": "04/08/2025",
+ "_csharplang/proposals/*.md": "06/19/2025",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "11/08/2022",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 8.md": "11/08/2023",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md": "11/09/2024",
@@ -713,6 +714,7 @@
"_csharplang/proposals/null-conditional-assignment.md": "Null conditional assignment",
"_csharplang/proposals/extensions.md": "Extension members",
"_csharplang/proposals/user-defined-compound-assignment.md": "User-defined compound assignment",
+ "_csharplang/proposals/ignored-directives.md": "Ignored preprocessor directives",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "C# compiler breaking changes since C# 10",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 8.md": "C# compiler breaking changes since C# 11",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md": "C# compiler breaking changes since C# 12",
@@ -838,6 +840,7 @@
"_csharplang/proposals/null-conditional-assignment.md": "This proposal allows the null conditional operator to be used for the destination of assignment expressions. This allows you to assign a value to a property or field only if the left side is not null.",
"_csharplang/proposals/extensions.md": "This proposal enables new kinds of extension members. These new extension members support extension properties, extension static members, including extension operators.",
"_csharplang/proposals/user-defined-compound-assignment.md": "This proposal introduces user-defined compound assignment operators. Developers can override compound assignment, increment, and decrement operators.",
+ "_csharplang/proposals/ignored-directives.md": "This proposal allows a source file to include ignored directives. In most cases, ignored directives are used for file based programs, for example `#!`",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "Learn about any breaking changes since the initial release of C# 10 and included in C# 11",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 8.md": "Learn about any breaking changes since the initial release of C# 11 and included in C# 12",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md": "Learn about any breaking changes since the initial release of C# 12 and included in C# 13",
diff --git a/docs/csharp/fundamentals/program-structure/index.md b/docs/csharp/fundamentals/program-structure/index.md
index 08da9f34b780a..33067c5d2802f 100644
--- a/docs/csharp/fundamentals/program-structure/index.md
+++ b/docs/csharp/fundamentals/program-structure/index.md
@@ -1,10 +1,9 @@
---
title: "General Structure of a Program"
description: Learn about the structure of a C# program by using a skeleton program that contains all the required elements for a program.
-ms.date: 08/01/2024
+ms.date: 06/20/2025
helpviewer_keywords:
- "C# language, program structure"
-ms.assetid: 5ae964a5-0ef0-40fe-88fb-6d1793371d0d
---
# General Structure of a C# Program
@@ -12,18 +11,34 @@ C# programs consist of one or more files. Each file contains zero or more namesp
:::code language="csharp" source="snippets/toplevel-structure/Program.cs":::
-The preceding example uses [*top-level statements*](top-level-statements.md) for the program's entry point. Only one file can have top-level statements. The program's entry point is the first line of program text in that file. In this case, it's the `Console.WriteLine("Hello world!");`.
+The preceding example uses [*top-level statements*](top-level-statements.md) for the program's entry point. Only one file can have top-level statements. The program's entry point is the first text line of program text in that file. In this case, it's the `Console.WriteLine("Hello world!");`.
You can also create a static method named [`Main`](main-command-line.md) as the program's entry point, as shown in the following example:
:::code language="csharp" source="snippets/structure/Program.cs":::
-In that case the program will start in the first line of `Main` method, which is `Console.WriteLine("Hello world!");`
+In that case the program starts in the opening brace of `Main` method, which is `Console.WriteLine("Hello world!");`
+
+## Building and running C# programs
+
+C# is a *compiled* language. In most C# programs, you use the [`dotnet build`](../../../core/tools/dotnet-build.md) command to compile a group of source files into a binary package. Then, you use the [`dotnet run`](../../../core/tools/dotnet-run.md) command to run the program. (You can simplify this process because `dotnet run` compiles the program before running it if necessary.) These tools support a rich language of configuration options and command-line switches. The `dotnet` command line interface (CLI), which is included in the .NET SDK, provides many [tools](../../../core/tools/index.md) to generate and modify C# files.
+
+Beginning with C# 14 and .NET 10, you can create *file based programs*, which simplifies building and running C# programs. You use the `dotnet run` command to run a program contained in a single `*.cs` file. For example, if the following snippet is stored in a file named `hello-world.cs`, you can run it by typing `dotnet run hello-world.cs`:
+
+:::code language="csharp" source="./snippets/file-based-program/hello-world.cs":::
+
+The first line of the program contains the `#!` sequence for Unix shells. The location of the `dotnet` CLI can vary on different distributions. On any Unix system, if you set the *execute* (`+x`) permission on a C# file, you can run the C# file from the command line:
+
+```bash
+./hello-world.cs
+```
+
+The source for these programs must be a single file, but otherwise all C# syntax is valid. You can use file based programs for small command-line utilities, prototypes, or other experiments. File based programs allow [preprocessor directives](../../language-reference/preprocessor-directives.md#file-based-programs) that configure the build system.
## Expressions and statements
C# programs are built using *expressions* and *statements*. Expressions produce a value, and statements perform an action:
-An *expression* is a combination of values, variables, operators, and method calls that evaluates to a single value. Expressions produce a result and can be used wherever a value is expected. The following examples are expressions:
+An *expression* is a combination of values, variables, operators, and method calls that evaluate to a single value. Expressions produce a result and can be used wherever a value is expected. The following examples are expressions:
- `42` (literal value)
- `x + y` (arithmetic operation)
diff --git a/docs/csharp/fundamentals/program-structure/main-command-line.md b/docs/csharp/fundamentals/program-structure/main-command-line.md
index ffa27d3a4ce17..2c05e82edfb1d 100644
--- a/docs/csharp/fundamentals/program-structure/main-command-line.md
+++ b/docs/csharp/fundamentals/program-structure/main-command-line.md
@@ -1,7 +1,7 @@
---
title: "Main() and command-line arguments"
description: Learn about Main() and command-line arguments. The 'Main' method is the entry point of an executable program.
-ms.date: 03/14/2024
+ms.date: 06/23/2025
f1_keywords:
- "main_CSharpKeyword"
- "Main"
@@ -16,27 +16,25 @@ helpviewer_keywords:
The `Main` method is the entry point of a C# application. When the application is started, the `Main` method is the first method that is invoked.
-There can only be one entry point in a C# program. If you have more than one class that has a `Main` method, you must compile your program with the **StartupObject** compiler option to specify which `Main` method to use as the entry point. For more information, see [**StartupObject** (C# Compiler Options)](../../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject).
-
Below is the example where the first line executed will display the number of command line arguments:
+There can only be one entry point in a C# program. If you have more than one class that has a `Main` method, you must compile your program with the **StartupObject** compiler option to specify which `Main` method to use as the entry point. For more information, see [**StartupObject** (C# Compiler Options)](../../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject). The following example displays the number of command line arguments as its first action:
:::code language="csharp" source="snippets/main-command-line/TestClass.cs":::
-You can also use Top-level statements in one file as the entry point for your application.
-Just as the `Main` method, top-level statements can also [return values](#main-return-values) and access [command-line arguments](#command-line-arguments).
-For more information, see [Top-level statements](top-level-statements.md).
-
The following example uses a `foreach` loop to display the command line arguments using the `args` variable, and at the end of the program returns a success code (`0`):
+You can also use top-level statements in one file as the entry point for your application. Just as the `Main` method, top-level statements can also [return values](#main-return-values) and access [command-line arguments](#command-line-arguments). For more information, see [Top-level statements](top-level-statements.md). The following example uses a `foreach` loop to display the command-line arguments using the `args` variable, and at the end of the program returns a success code (`0`):
:::code language="csharp" source="snippets/top-level-statements-1/Program.cs":::
+Beginning with C# 14, programs can be [*file based programs*](./index.md#building-and-running-c-programs), where a single file contains the program. You run *file based programs* with the command `dotnet run `, or using the `#!/usr/local/share/dotnet/dotnet run` directive as the first line (unix shells only).
+
## Overview
-- The `Main` method is the entry point of an executable program; it is where the program control starts and ends.
+- The `Main` method is the entry point of an executable program; it's where the program control starts and ends.
- `Main` must be declared inside a class or struct. The enclosing `class` can be `static`.
- `Main` must be [`static`](../../language-reference/keywords/static.md).
- `Main` can have any [access modifier](../../programming-guide/classes-and-structs/access-modifiers.md) (except `file`).
- `Main` can either have a `void`, `int`, `Task`, or `Task` return type.
-- If and only if `Main` returns a `Task` or `Task`, the declaration of `Main` may include the [`async`](../../language-reference/keywords/async.md) modifier. This specifically excludes an `async void Main` method.
-- The `Main` method can be declared with or without a `string[]` parameter that contains command-line arguments. When using Visual Studio to create Windows applications, you can add the parameter manually or else use the method to obtain the command-line arguments. Parameters are read as zero-indexed command-line arguments. Unlike C and C++, the name of the program is not treated as the first command-line argument in the `args` array, but it is the first element of the method.
+- If and only if `Main` returns a `Task` or `Task`, the declaration of `Main` can include the [`async`](../../language-reference/keywords/async.md) modifier. This rule specifically excludes an `async void Main` method.
+- The `Main` method can be declared with or without a `string[]` parameter that contains command-line arguments. When using Visual Studio to create Windows applications, you can add the parameter manually or else use the method to obtain the command-line arguments. Parameters are read as zero-indexed command-line arguments. Unlike C and C++, the name of the program isn't treated as the first command-line argument in the `args` array, but it's the first element of the method.
The following list shows the most common `Main` declarations:
@@ -51,7 +49,7 @@ static async Task Main(string[] args) { }
static async Task Main(string[] args) { }
```
-The preceding examples don't specify an access modifier, so they're implicitly `private` by default. That's typical, but it's possible to specify any explicit access modifier.
+The preceding examples don't specify an access modifier, so they're implicitly `private` by default. It's possible to specify any explicit access modifier.
> [!TIP]
> The addition of `async` and `Task`, `Task` return types simplifies program code when console applications need to start and `await` asynchronous operations in `Main`.
@@ -60,27 +58,27 @@ The preceding examples don't specify an access modifier, so they're implicitly `
You can return an `int` from the `Main` method by defining the method in one of the following ways:
-| `Main` declaration | `Main` method code |
-|----------------------------------------------|--------------------------------|
-| `static int Main()` | No use of `args` or `await` |
-| `static int Main(string[] args)` | Uses `args`, no use of `await` |
-| `static async Task Main()` | No use of `args`, uses `await` |
-| `static async Task Main(string[] args)` | Uses `args` and `await` |
+| `Main` declaration | `Main` method code |
+|----------------------------------------------|-----------------------------|
+| `static int Main()` | No use of `args` or `await` |
+| `static int Main(string[] args)` | Uses `args` but not `await` |
+| `static async Task Main()` | Uses `await` but not `args` |
+| `static async Task Main(string[] args)` | Uses `args` and `await` |
-If the return value from `Main` is not used, returning `void` or `Task` allows for slightly simpler code.
+If the return value from `Main` isn't used, returning `void` or `Task` allows for slightly simpler code.
-| `Main` declaration | `Main` method code |
-|-----------------------------------------|--------------------------------|
-| `static void Main()` | No use of `args` or `await` |
-| `static void Main(string[] args)` | Uses `args`, no use of `await` |
-| `static async Task Main()` | No use of `args`, uses `await` |
-| `static async Task Main(string[] args)` | Uses `args` and `await` |
+| `Main` declaration | `Main` method code |
+|-----------------------------------------|-----------------------------|
+| `static void Main()` | No use of `args` or `await` |
+| `static void Main(string[] args)` | Uses `args` but not `await` |
+| `static async Task Main()` | Uses `await` but not `args` |
+| `static async Task Main(string[] args)` | Uses `args` and `await` |
However, returning `int` or `Task` enables the program to communicate status information to other programs or scripts that invoke the executable file.
The following example shows how the exit code for the process can be accessed.
-This example uses [.NET Core](../../../core/introduction.md) command-line tools. If you are unfamiliar with .NET Core command-line tools, you can learn about them in this [get-started article](../../../core/tutorials/with-visual-studio-code.md).
+This example uses [.NET Core](../../../core/introduction.md) command-line tools. If you're unfamiliar with .NET Core command-line tools, you can learn about them in this [get-started article](../../../core/tutorials/with-visual-studio-code.md).
Create a new application by running `dotnet new console`. Modify the `Main` method in *Program.cs* as follows:
@@ -94,7 +92,7 @@ You can build the application using the [dotnet CLI](../../../core/tools/dotnet.
Next, create a PowerShell script to run the application and display the result. Paste the following code into a text file and save it as `test.ps1` in the folder that contains the project. Run the PowerShell script by typing `test.ps1` at the PowerShell prompt.
-Because the code returns zero, the batch file will report success. However, if you change MainReturnValTest.cs to return a non-zero value and then recompile the program, subsequent execution of the PowerShell script will report failure.
+Because the code returns zero, the batch file reports success. However, if you change MainReturnValTest.cs to return a non-zero value and then recompile the program, subsequent execution of the PowerShell script reports failure.
```powershell
dotnet run
@@ -114,24 +112,7 @@ Return value = 0
### Async Main return values
-When you declare an `async` return value for `Main`, the compiler generates the boilerplate code for calling asynchronous methods in `Main`. If you don't specify the `async` keyword, you need to write that code yourself, as shown in the following example. The code in the example ensures that your program runs until the asynchronous operation is completed:
-
-```csharp
-class AsyncMainReturnValTest
-{
- public static int Main()
- {
- return AsyncConsoleWork().GetAwaiter().GetResult();
- }
-
- private static async Task AsyncConsoleWork()
- {
- return 0;
- }
-}
-```
-
-This boilerplate code can be replaced by:
+When you declare an `async` return value for `Main`, the compiler generates the boilerplate code for calling asynchronous methods in `Main`:
:::code language="csharp" source="snippets/main-arguments/Program.cs" id="AsyncMain":::
@@ -153,21 +134,21 @@ When the application entry point returns a `Task` or `Task`, the compiler g
You can send arguments to the `Main` method by defining the method in one of the following ways:
-| `Main` declaration | `Main` method code |
-|----------------------------------------------|------------------------------------|
-| `static void Main(string[] args)` | No return value, no use of `await` |
-| `static int Main(string[] args)` | Return value, no use of `await` |
-| `static async Task Main(string[] args)` | No return value, uses `await` |
-| `static async Task Main(string[] args)` | Return value, uses `await` |
+| `Main` declaration | `Main` method code |
+|----------------------------------------------|-----------------------------------------|
+| `static void Main(string[] args)` | No return value or `await` |
+| `static int Main(string[] args)` | Returns a value but doesn't use `await` |
+| `static async Task Main(string[] args)` | Uses `await` but doesn't return a value |
+| `static async Task Main(string[] args)` | Return a value and uses `await` |
-If the arguments are not used, you can omit `args` from the method declaration for slightly simpler code:
+If the arguments aren't used, you can omit `args` from the method declaration for slightly simpler code:
-| `Main` declaration | `Main` method code |
-|---------------------------------|------------------------------------|
-| `static void Main()` | No return value, no use of `await` |
-| `static int Main()` | Return value, no use of `await` |
-| `static async Task Main()` | No return value, uses `await` |
-| `static async Task Main()` | Return value, uses `await` |
+| `Main` declaration | `Main` method code |
+|---------------------------------|-----------------------------------------|
+| `static void Main()` | No return value or `await` |
+| `static int Main()` | Returns a value but doesn't use `await` |
+| `static async Task Main()` | Uses `await` but doesn't return a value |
+| `static async Task Main()` | Returns a value and uses `await` |
> [!NOTE]
> You can also use or to access the command-line arguments from any point in a console or Windows Forms application. To enable command-line arguments in the `Main` method declaration in a Windows Forms application, you must manually modify the declaration of `Main`. The code generated by the Windows Forms designer creates `Main` without an input parameter.
@@ -185,7 +166,7 @@ You can also convert the string arguments to numeric types by using the
- If arguments are provided (`args.Length` is greater than 0) program tries to convert the input arguments to numbers. This will throw an exception if the argument is not a number.
- After factorial is calculated (stored in `result` variable of type `long`) the verbose result is printed depending on the `result` variable.
+ At the beginning of the `Main` method the program tests if input arguments weren't supplied comparing length of `args` argument to `0` and displays the help if no arguments are found.
+ If arguments are provided (`args.Length` is greater than 0), the program tries to convert the input arguments to numbers. This example throws an exception if the argument isn't a number.
+ After factorial is calculated (stored in `result` variable of type `long`), the verbose result is printed depending on the `result` variable.
2. From the **Start** screen or **Start** menu, open a Visual Studio **Developer Command Prompt** window, and then navigate to the folder that contains the file that you created.
-3. Enter the following command to compile the application.
+3. To compile the application, enter the following command:
`dotnet build`
- If your application has no compilation errors, an executable file that's named *Factorial.exe* is created.
+ If your application has no compilation errors, a binary file named *Factorial.dll* is created.
4. Enter the following command to calculate the factorial of 3:
diff --git a/docs/csharp/fundamentals/program-structure/snippets/file-based-program/hello-world.cs b/docs/csharp/fundamentals/program-structure/snippets/file-based-program/hello-world.cs
new file mode 100644
index 0000000000000..e3173e7a15eb4
--- /dev/null
+++ b/docs/csharp/fundamentals/program-structure/snippets/file-based-program/hello-world.cs
@@ -0,0 +1,2 @@
+#!/usr/local/share/dotnet/dotnet run
+Console.WriteLine("Hello, World!");
diff --git a/docs/csharp/fundamentals/program-structure/top-level-statements.md b/docs/csharp/fundamentals/program-structure/top-level-statements.md
index 2d9889234055e..685daa1814d0e 100644
--- a/docs/csharp/fundamentals/program-structure/top-level-statements.md
+++ b/docs/csharp/fundamentals/program-structure/top-level-statements.md
@@ -1,7 +1,7 @@
---
title: "Top-level statements - programs without Main methods"
description: Learn about top-level statements. You can create programs without the ceremony of a Program class and a Main method.
-ms.date: 11/22/2024
+ms.date: 06/23/2025
helpviewer_keywords:
- "C# language, top-level statements"
- "C# language, Main method"
@@ -85,6 +85,8 @@ The compiler generates a method to serve as the program entry point for a projec
| `return` | `static int Main(string[] args)` |
| No `await` or `return` | `static void Main(string[] args)` |
+Beginning with C# 14, programs can be [*file based programs*](./index.md#building-and-running-c-programs), where a single file contains the program. You run *file based programs* with the command `dotnet run `, or using the `#!/usr/local/share/dotnet/dotnet run` directive as the first line (unix shells only).
+
## C# language specification
[!INCLUDE[CSharplangspec](~/includes/csharplangspec-md.md)]
diff --git a/docs/csharp/language-reference/preprocessor-directives.md b/docs/csharp/language-reference/preprocessor-directives.md
index c136e05808a10..1c4057ff78a31 100644
--- a/docs/csharp/language-reference/preprocessor-directives.md
+++ b/docs/csharp/language-reference/preprocessor-directives.md
@@ -1,7 +1,7 @@
---
description: "Learn the different C# preprocessor directives that control conditional compilation, warnings, nullable analysis, and more"
title: "Preprocessor directives"
-ms.date: 01/14/2025
+ms.date: 06/19/2025
f1_keywords:
- "cs.preprocessor"
- "#nullable"
@@ -20,6 +20,10 @@ f1_keywords:
- "#pragma warning"
- "#pragma checksum"
- "defaultline_CSharpKeyword"
+ - "#!"
+ - "#:sdk"
+ - "#:property"
+ - "#:package"
helpviewer_keywords:
- "preprocessor directives [C#]"
- "keywords [C#], preprocessor directives"
@@ -43,6 +47,63 @@ helpviewer_keywords:
Although the compiler doesn't have a separate preprocessor, the directives described in this section are processed as if there were one. You use them to help in conditional compilation. Unlike C and C++ directives, you can't use these directives to create macros. A preprocessor directive must be the only instruction on a line.
+## File based programs
+
+*File based programs* are programs that are compiled and run using `dotnet run Program.cs` (or any `*.cs` file). The C# compiler ignores these preprocessor directives, but the build system parses them to produce the output. These directives generate warnings when encountered in a project-based compilation.
+
+The C# compiler ignores any preprocessor directive that starts with `#:` or `#!`.
+
+The `#!` preprocessor directive enables unix shells to directly execute a C# file using `dotnet run`. For example:
+
+```csharp
+#!/usr/local/share/dotnet/dotnet run
+Console.WriteLine("Hello");
+```
+
+The preceding code snippet informs a Unix shell to execute the file using `/usr/local/share/dotnet/dotnet run`. (Your installation directory for the `dotnet` CLI can be different on different Unix or macOS distributions). The `#!` line must be the first line in the file, and the following tokens are the program to run. You need to enable the *execute* (`x`) permission on the C# file for that feature.
+
+The `#:` directives that are used in file based programs include:
+
+- `#:sdk`:
+
+ The first instance specifies the value for the `` node. Subsequent instances specify the `` node. The version can be omitted. For example:
+
+ ```csharp
+ #:sdk Microsoft.NET.Sdk.Web
+ ```
+
+- `#:property`:
+
+ Instances of `#:property` are translated into property elements in a ``. A token of the form `Name=value` must follow the `property` token. The following example directives are valid `property` tokens:
+
+ ```csharp
+ #:property TargetFramework=net11.0
+ #:property LangVersion=preview
+ ```
+
+ The preceding two properties are translated into:
+
+ ```xml
+ net11.0
+ preview
+ ```
+
+- `#:package`:
+
+ Instances of `#:package` are translated into `PackageReference` elements to include NuGet packages with the specified version to your file. For example:
+
+ ```csharp
+ #:package System.CommandLine@2.0.0-*
+ ```
+
+ The preceding preprocessor token is translated into:
+
+ ```xml
+
+ ```
+
+Tools can add new tokens following the `#:` convention.
+
## Nullable context
The `#nullable` preprocessor directive sets the *annotations* and *warning* flags in the *nullable context*. This directive controls whether nullable annotations have effect, and whether nullability warnings are given. Each flag is either *disabled* or *enabled*.
diff --git a/docs/csharp/specification/toc.yml b/docs/csharp/specification/toc.yml
index 7c9a0759f63a9..c843abdd0f15c 100644
--- a/docs/csharp/specification/toc.yml
+++ b/docs/csharp/specification/toc.yml
@@ -79,6 +79,8 @@ items:
href: ../../../_csharplang/proposals/csharp-10.0/enhanced-line-directives.md
- name: "Escape sequence '\\e'"
href: ../../../_csharplang/proposals/csharp-13.0/esc-escape-sequence.md
+ - name: "Ignored directives"
+ href: ../../../_csharplang/proposals/ignored-directives.md
- name: Basic concepts
items:
- name: Top-level statements
diff --git a/docs/csharp/tour-of-csharp/overview.md b/docs/csharp/tour-of-csharp/overview.md
index 6bc393c9158fe..12ce5c50d3659 100644
--- a/docs/csharp/tour-of-csharp/overview.md
+++ b/docs/csharp/tour-of-csharp/overview.md
@@ -1,7 +1,7 @@
---
title: Overview
description: New to C#? Learn the basics of the language. Start with this overview.
-ms.date: 03/17/2025
+ms.date: 06/20/2025
---
# A tour of the C# language
@@ -34,6 +34,22 @@ The `Program` class declared by the "Hello, World" program has a single member,
> [!TIP]
> The examples in this article give you a first look at C# code. Some samples might show elements of C# that you're not familiar with. When you're ready to learn C#, start with our [beginner tutorials](./tutorials/index.md), or dive into the links in each section. If you're experienced in [Java](./tips-for-java-developers.md), [JavaScript](./tips-for-javascript-developers.md), [TypeScript](./tips-for-javascript-developers.md), or [Python](./tips-for-python-developers.md), read our tips to help you find the information you need to quickly learn C#.
+## File based programs
+
+C# is a *compiled* language. In most C# programs, you use the [`dotnet build`](../../core/tools/dotnet-build.md) command to compile a group of source files into a binary package. Then, you use the [`dotnet run`](../../core/tools/dotnet-run.md) command to run the program. (You can simplify this process because `dotnet run` compiles the program before running it if necessary.) These tools support a rich language of configuration options and command-line switches. The `dotnet` command line interface (CLI), which is included in the .NET SDK, provides many [tools](../../core/tools/index.md) to generate and modify C# files.
+
+Beginning with C# 14 and .NET 10, you can create *file based programs*, which simplifies building and running C# programs. You use the `dotnet run` command to run a program contained in a single `*.cs` file. For example, if the following code is stored in a file named `hello-world.cs`, you can run it by typing `dotnet run hello-world.cs`:
+
+:::code language="csharp" source="./snippets/file-based-programs/hello-world.cs":::
+
+The first line of the program contains the `#!` sequence for unix shells. The location of the `dotnet` CLI can vary on different distributions. On any unix system, if you set the *execute* (`+x`) permission on a C# file, you can run the C# file from the command line:
+
+```bash
+./hello-world.cs
+```
+
+The source for these programs must be a single file, but otherwise all C# syntax is valid. You can use file based programs for small command-line utilities, prototypes, or other experiments.
+
## Familiar C# features
C# is approachable for beginners yet offers advanced features for experienced developers writing specialized applications. You can be productive quickly. You can learn more specialized techniques as you need them for your applications.
diff --git a/docs/csharp/tour-of-csharp/snippets/file-based-programs/hello-world.cs b/docs/csharp/tour-of-csharp/snippets/file-based-programs/hello-world.cs
new file mode 100755
index 0000000000000..e3173e7a15eb4
--- /dev/null
+++ b/docs/csharp/tour-of-csharp/snippets/file-based-programs/hello-world.cs
@@ -0,0 +1,2 @@
+#!/usr/local/share/dotnet/dotnet run
+Console.WriteLine("Hello, World!");
From 0608e771999a0b57b381a5ba09574a4f739ce4d5 Mon Sep 17 00:00:00 2001
From: Alvyn Berg <21360440+Alvynskio@users.noreply.github.com>
Date: Mon, 30 Jun 2025 11:50:37 -0400
Subject: [PATCH 04/19] Update winforms-applications.md (#47005)
Correct non-grammatical sentence
---
.../binaryformatter-migration-guide/winforms-applications.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md b/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md
index 45894b73fa07f..bb984836b7621 100644
--- a/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md
+++ b/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md
@@ -19,7 +19,7 @@ With BinaryFormatter's removal, it's expected that many Windows Forms applicatio
## How BinaryFormatter affects Windows Forms
-Prior to .NET 9, Windows Forms used [BinaryFormatter] to serialize and deserialize data for scenarios such clipboard, drag-and-drop, and storing or loading resources at design time. Starting with .NET 9, Windows Forms and WPF use a subset of the [BinaryFormatter] implementation internally for these scenarios. While BinaryFormatter's risks cannot be addressed in general-purpose serialization/deserialization, measures have been taken to mitigate the risks in these very specific use cases with a known set of types. A fall-back to [BinaryFormatter] is still in place for unknown or unsupported types, which will throw exceptions unless migration steps are taken in the application.
+Prior to .NET 9, Windows Forms used [BinaryFormatter] to serialize and deserialize data for scenarios such as clipboard, drag-and-drop, and storing or loading resources at design time. Starting with .NET 9, Windows Forms and WPF use a subset of the [BinaryFormatter] implementation internally for these scenarios. While BinaryFormatter's risks cannot be addressed in general-purpose serialization/deserialization, measures have been taken to mitigate the risks in these very specific use cases with a known set of types. A fall-back to [BinaryFormatter] is still in place for unknown or unsupported types, which will throw exceptions unless migration steps are taken in the application.
Windows Forms and WPF apps both handle the following types, along with arrays and lists of these types. Clipboard, drag-and-drop, and design-time resources will continue to work with these types without any migration steps needed.
From 3a881d21400258e6d4dd38151d2fc8a78e126857 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:33:55 +0000
Subject: [PATCH 05/19] Bump the dotnet group with 1 update (#47010)
Bumps Azure.Identity from 1.14.0 to 1.14.1
---
updated-dependencies:
- dependency-name: Azure.Identity
dependency-version: 1.14.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
docs/ai/quickstarts/snippets/structured-output/SOChat.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj b/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj
index 1a3b1069965de..c7e798b8c1ac1 100644
--- a/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj
+++ b/docs/ai/quickstarts/snippets/structured-output/SOChat.csproj
@@ -10,7 +10,7 @@
-
+
From e983db02da0b4a2e052dbe60e699ea5b9278fc0a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:38:33 +0000
Subject: [PATCH 06/19] Bump the dotnet group with 1 update (#47011)
Bumps OllamaSharp from 5.2.2 to 5.2.3
---
updated-dependencies:
- dependency-name: OllamaSharp
dependency-version: 5.2.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../ConsoleAI.DependencyInjection.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj
index 25ae5aa08f024..812320fc22c77 100644
--- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj
+++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj
@@ -8,7 +8,7 @@
-
+
From 3f06680e376b7e9860db63b188997d605e15ec52 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:43:47 +0000
Subject: [PATCH 07/19] Bump the dotnet group with 1 update (#47012)
Bumps OllamaSharp from 5.1.19 to 5.2.3
---
updated-dependencies:
- dependency-name: OllamaSharp
dependency-version: 5.2.3
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../ConsoleAI.CreateEmbeddings.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CreateEmbeddings/ConsoleAI.CreateEmbeddings.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CreateEmbeddings/ConsoleAI.CreateEmbeddings.csproj
index 6e0c682243e90..0585d9bd23c4a 100644
--- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CreateEmbeddings/ConsoleAI.CreateEmbeddings.csproj
+++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.CreateEmbeddings/ConsoleAI.CreateEmbeddings.csproj
@@ -8,7 +8,7 @@
-
+
From a718846ff20755f2916957bc44d2c2e8d9b3bc9d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:47:24 +0000
Subject: [PATCH 08/19] Bump the dotnet group with 1 update (#47014)
Bumps Azure.Identity from 1.14.0 to 1.14.1
---
updated-dependencies:
- dependency-name: Azure.Identity
dependency-version: 1.14.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../prompt-completion/azure-openai/ExtensionsAzureOpenAI.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/quickstarts/snippets/prompt-completion/azure-openai/ExtensionsAzureOpenAI.csproj b/docs/ai/quickstarts/snippets/prompt-completion/azure-openai/ExtensionsAzureOpenAI.csproj
index eb69d6473a9e3..8f39127c815cb 100644
--- a/docs/ai/quickstarts/snippets/prompt-completion/azure-openai/ExtensionsAzureOpenAI.csproj
+++ b/docs/ai/quickstarts/snippets/prompt-completion/azure-openai/ExtensionsAzureOpenAI.csproj
@@ -8,7 +8,7 @@
-
+
From 561ec243b1496511846985833120537b53e09349 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:49:18 +0000
Subject: [PATCH 09/19] Bump the dotnet group with 1 update (#47015)
Bumps Microsoft.Extensions.AI.Abstractions from 9.5.0 to 9.6.0
---
updated-dependencies:
- dependency-name: Microsoft.Extensions.AI.Abstractions
dependency-version: 9.6.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../snippets/sample-implementations/Implementations.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/advanced/snippets/sample-implementations/Implementations.csproj b/docs/ai/advanced/snippets/sample-implementations/Implementations.csproj
index efb828e6cb8ee..508597e7b9af5 100644
--- a/docs/ai/advanced/snippets/sample-implementations/Implementations.csproj
+++ b/docs/ai/advanced/snippets/sample-implementations/Implementations.csproj
@@ -7,7 +7,7 @@
-
+
From e7abaa9e5d60f3c1ca893435ca75f9515549fd6b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:53:27 +0000
Subject: [PATCH 10/19] Bump github/codeql-action from 3.29.0 to 3.29.2
(#47017)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.0 to 3.29.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/ce28f5bb42b7a9f2c824e633a3f6ee835bab6858...181d5eefc20863364f96762470ba6f862bdef56b)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.29.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/scorecards.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index a790311ee2fd2..dcc81073bdafd 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -71,6 +71,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
+ uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
with:
sarif_file: results.sarif
From 3e43a737dccba4b184d35c6fcf5b49e7544d3367 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:53:45 +0000
Subject: [PATCH 11/19] Bump the dotnet group with 1 update (#47016)
Bumps OllamaSharp from 5.1.19 to 5.2.3
---
updated-dependencies:
- dependency-name: OllamaSharp
dependency-version: 5.2.3
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../ConsoleAI.ConsumeRateLimitingEmbedding.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeRateLimitingEmbedding/ConsoleAI.ConsumeRateLimitingEmbedding.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeRateLimitingEmbedding/ConsoleAI.ConsumeRateLimitingEmbedding.csproj
index 6e0c682243e90..0585d9bd23c4a 100644
--- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeRateLimitingEmbedding/ConsoleAI.ConsumeRateLimitingEmbedding.csproj
+++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeRateLimitingEmbedding/ConsoleAI.ConsumeRateLimitingEmbedding.csproj
@@ -8,7 +8,7 @@
-
+
From 29b4b3542fcc7f3f8e20f47cf17262db8c1bd210 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:59:47 +0000
Subject: [PATCH 12/19] Bump the dotnet group with 1 update (#47022)
Bumps Microsoft.ServiceFabric.Services from 8.0.2707 to 8.1.208
---
updated-dependencies:
- dependency-name: Microsoft.ServiceFabric.Services
dependency-version: 8.1.208
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../stateless/Orleans.ServiceFabric.Stateless.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj b/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj
index d179b582e9005..ff4eb2d1223c9 100644
--- a/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj
+++ b/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj
@@ -13,7 +13,7 @@
-
+
From a1fb466d8ce99ec7cd7d4a8e98f46042c59ddce2 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 17:02:54 +0000
Subject: [PATCH 13/19] Bump the dotnet group with 1 update (#47025)
Bumps Azure.Identity from 1.14.0 to 1.14.1
---
updated-dependencies:
- dependency-name: Azure.Identity
dependency-version: 1.14.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
docs/azure/sdk/snippets/authentication/Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/azure/sdk/snippets/authentication/Directory.Packages.props b/docs/azure/sdk/snippets/authentication/Directory.Packages.props
index 625b77b447470..57ada0596ac1f 100644
--- a/docs/azure/sdk/snippets/authentication/Directory.Packages.props
+++ b/docs/azure/sdk/snippets/authentication/Directory.Packages.props
@@ -8,7 +8,7 @@
-
+
From bd69b31fa266a33bd312c1f36dfc2b9cd07b2dd2 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 17:03:18 +0000
Subject: [PATCH 14/19] Bump the dotnet group with 1 update (#47026)
Bumps OllamaSharp from 5.1.19 to 5.2.3
---
updated-dependencies:
- dependency-name: OllamaSharp
dependency-version: 5.2.3
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../ConsoleAI.GetResponseAsyncArgs.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetResponseAsyncArgs/ConsoleAI.GetResponseAsyncArgs.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetResponseAsyncArgs/ConsoleAI.GetResponseAsyncArgs.csproj
index 6e0c682243e90..0585d9bd23c4a 100644
--- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetResponseAsyncArgs/ConsoleAI.GetResponseAsyncArgs.csproj
+++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetResponseAsyncArgs/ConsoleAI.GetResponseAsyncArgs.csproj
@@ -8,7 +8,7 @@
-
+
From 93249dac3e9c5f57e5495b87f49032390e2f0fb0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 17:07:34 +0000
Subject: [PATCH 15/19] Bump the dotnet group with 1 update (#47027)
Bumps OllamaSharp from 5.1.19 to 5.2.3
---
updated-dependencies:
- dependency-name: OllamaSharp
dependency-version: 5.2.3
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../ConsoleAI.ConsumeClientMiddleware.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj
index e345a07129f5a..f9300b408249d 100644
--- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj
+++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj
@@ -9,7 +9,7 @@
-
+
From be1c1bd7e33e80c5232a724e467263fdfb1d017c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 17:08:18 +0000
Subject: [PATCH 16/19] Bump the dotnet group with 1 update (#47030)
Bumps Azure.Identity from 1.14.0 to 1.14.1
---
updated-dependencies:
- dependency-name: Azure.Identity
dependency-version: 1.14.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
docs/ai/quickstarts/snippets/assistants/AIAssistants.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/quickstarts/snippets/assistants/AIAssistants.csproj b/docs/ai/quickstarts/snippets/assistants/AIAssistants.csproj
index 130d9ab546ae0..163bdcd1d0988 100644
--- a/docs/ai/quickstarts/snippets/assistants/AIAssistants.csproj
+++ b/docs/ai/quickstarts/snippets/assistants/AIAssistants.csproj
@@ -9,7 +9,7 @@
-
+
From 0b950a23376fd116c1bf52fd852df2ab05ae9af0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 17:22:32 +0000
Subject: [PATCH 17/19] Bump the dotnet group with 1 update (#47031)
Bumps OllamaSharp from 5.1.19 to 5.2.3
---
updated-dependencies:
- dependency-name: OllamaSharp
dependency-version: 5.2.3
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: dotnet
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.../ConsoleAI.GetStreamingResponseAsync.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetStreamingResponseAsync/ConsoleAI.GetStreamingResponseAsync.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetStreamingResponseAsync/ConsoleAI.GetStreamingResponseAsync.csproj
index 6e0c682243e90..0585d9bd23c4a 100644
--- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetStreamingResponseAsync/ConsoleAI.GetStreamingResponseAsync.csproj
+++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.GetStreamingResponseAsync/ConsoleAI.GetStreamingResponseAsync.csproj
@@ -8,7 +8,7 @@
-
+
From 2a889c3995a679f7dee445fdb6e6fe0559024fd0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:02:13 -0400
Subject: [PATCH 18/19] Bump step-security/harden-runner from 2.12.1 to 2.12.2
(#47021)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.12.1 to 2.12.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/002fdce3c6a235733a90a27c80493a3241e56863...6c439dc8bdf85cadbbce9ed30d1c7b959517bc49)
---
updated-dependencies:
- dependency-name: step-security/harden-runner
dependency-version: 2.12.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/check-for-build-warnings.yml | 2 +-
.github/workflows/cleanrepo-orphaned-articles.yml | 2 +-
.github/workflows/cleanrepo-orphaned-images.yml | 2 +-
.github/workflows/cleanrepo-orphaned-includes.yml | 2 +-
.github/workflows/cleanrepo-orphaned-snippets.yml | 2 +-
.github/workflows/cleanrepo-redirect-hops.yml | 2 +-
.github/workflows/cleanrepo-relative-links.yml | 2 +-
.github/workflows/cleanrepo-replace-redirects.yml | 2 +-
.github/workflows/dependabot-bot.yml | 2 +-
.github/workflows/dependency-review.yml | 2 +-
.github/workflows/do-not-merge-label-check.yml | 2 +-
.github/workflows/docs-verifier.yml | 2 +-
.github/workflows/live-protection.yml | 2 +-
.github/workflows/markdownlint.yml | 2 +-
.github/workflows/profanity-filter.yml | 2 +-
.github/workflows/quest-bulk.yml | 2 +-
.github/workflows/quest.yml | 2 +-
.github/workflows/scorecards.yml | 2 +-
.github/workflows/snippets5000.yml | 2 +-
.github/workflows/stale.yml | 2 +-
.github/workflows/version-sweep.yml | 2 +-
.github/workflows/whats-new.yml | 2 +-
22 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/check-for-build-warnings.yml b/.github/workflows/check-for-build-warnings.yml
index 1a35e43dec6e1..d3d0abfd77db8 100644
--- a/.github/workflows/check-for-build-warnings.yml
+++ b/.github/workflows/check-for-build-warnings.yml
@@ -16,7 +16,7 @@ jobs:
pull-requests: write
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/cleanrepo-orphaned-articles.yml b/.github/workflows/cleanrepo-orphaned-articles.yml
index eb58106d6518b..d3c088d3542c9 100644
--- a/.github/workflows/cleanrepo-orphaned-articles.yml
+++ b/.github/workflows/cleanrepo-orphaned-articles.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/cleanrepo-orphaned-images.yml b/.github/workflows/cleanrepo-orphaned-images.yml
index 18797050e37e3..78c86722eda7d 100644
--- a/.github/workflows/cleanrepo-orphaned-images.yml
+++ b/.github/workflows/cleanrepo-orphaned-images.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/cleanrepo-orphaned-includes.yml b/.github/workflows/cleanrepo-orphaned-includes.yml
index bf25f6d25cf8c..eb9d5b44ef5f3 100644
--- a/.github/workflows/cleanrepo-orphaned-includes.yml
+++ b/.github/workflows/cleanrepo-orphaned-includes.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/cleanrepo-orphaned-snippets.yml b/.github/workflows/cleanrepo-orphaned-snippets.yml
index 091fc0d446a5f..cd80b0c25b368 100644
--- a/.github/workflows/cleanrepo-orphaned-snippets.yml
+++ b/.github/workflows/cleanrepo-orphaned-snippets.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/cleanrepo-redirect-hops.yml b/.github/workflows/cleanrepo-redirect-hops.yml
index dfc4ba05d8db4..79aaba1f9cda0 100644
--- a/.github/workflows/cleanrepo-redirect-hops.yml
+++ b/.github/workflows/cleanrepo-redirect-hops.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/cleanrepo-relative-links.yml b/.github/workflows/cleanrepo-relative-links.yml
index 57924e5ec92e0..9efd217da2747 100644
--- a/.github/workflows/cleanrepo-relative-links.yml
+++ b/.github/workflows/cleanrepo-relative-links.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/cleanrepo-replace-redirects.yml b/.github/workflows/cleanrepo-replace-redirects.yml
index 5e6f4abbdf992..634801e86b53b 100644
--- a/.github/workflows/cleanrepo-replace-redirects.yml
+++ b/.github/workflows/cleanrepo-replace-redirects.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/dependabot-bot.yml b/.github/workflows/dependabot-bot.yml
index b38144c3d1ec1..745d7833b84a0 100644
--- a/.github/workflows/dependabot-bot.yml
+++ b/.github/workflows/dependabot-bot.yml
@@ -26,7 +26,7 @@ jobs:
# Checkout the repo into the workspace within the VM
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index 4373ef8d621c5..27b16dbaab66f 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/do-not-merge-label-check.yml b/.github/workflows/do-not-merge-label-check.yml
index 4b49096298a3a..18f4fe30faea2 100644
--- a/.github/workflows/do-not-merge-label-check.yml
+++ b/.github/workflows/do-not-merge-label-check.yml
@@ -22,7 +22,7 @@ jobs:
- 'DO NOT MERGE'
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/docs-verifier.yml b/.github/workflows/docs-verifier.yml
index 368399a1df772..a5d23edd9d5e3 100644
--- a/.github/workflows/docs-verifier.yml
+++ b/.github/workflows/docs-verifier.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/live-protection.yml b/.github/workflows/live-protection.yml
index 7356de15092b6..402640a6c0cb6 100644
--- a/.github/workflows/live-protection.yml
+++ b/.github/workflows/live-protection.yml
@@ -11,7 +11,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml
index f6ebee5887bd3..ac301d39d11d5 100644
--- a/.github/workflows/markdownlint.yml
+++ b/.github/workflows/markdownlint.yml
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/profanity-filter.yml b/.github/workflows/profanity-filter.yml
index b08eb26fd3ea3..15320623502b4 100644
--- a/.github/workflows/profanity-filter.yml
+++ b/.github/workflows/profanity-filter.yml
@@ -19,7 +19,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/quest-bulk.yml b/.github/workflows/quest-bulk.yml
index f3f522c8d24ba..8b42d2fb43e85 100644
--- a/.github/workflows/quest-bulk.yml
+++ b/.github/workflows/quest-bulk.yml
@@ -28,7 +28,7 @@ jobs:
if: ${{ github.repository_owner == 'dotnet' }}
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/quest.yml b/.github/workflows/quest.yml
index 81bfc8ed5e0d2..3b405a4434943 100644
--- a/.github/workflows/quest.yml
+++ b/.github/workflows/quest.yml
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index dcc81073bdafd..991a77a3753d5 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -31,7 +31,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/snippets5000.yml b/.github/workflows/snippets5000.yml
index 04edd857a86c3..978c5b263ea19 100644
--- a/.github/workflows/snippets5000.yml
+++ b/.github/workflows/snippets5000.yml
@@ -31,7 +31,7 @@ jobs:
steps:
# Checkout the repository for the PR
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 38ead6fbef145..8568731873bee 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -16,7 +16,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/version-sweep.yml b/.github/workflows/version-sweep.yml
index 97a0b80619b53..bb7c09db801c3 100644
--- a/.github/workflows/version-sweep.yml
+++ b/.github/workflows/version-sweep.yml
@@ -34,7 +34,7 @@ jobs:
# Start the .NET version updater action
# A composite of the .NET Version Sweeper and the .NET Upgrade Assistant
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
diff --git a/.github/workflows/whats-new.yml b/.github/workflows/whats-new.yml
index 5d23f3ed4ec42..6067f4574c574 100644
--- a/.github/workflows/whats-new.yml
+++ b/.github/workflows/whats-new.yml
@@ -23,7 +23,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
+ uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
From fec022f65c590a89b03281e6b66df3c61532d038 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Mon, 30 Jun 2025 13:04:12 -0700
Subject: [PATCH 19/19] Update package index with latest published versions
(#47033)
---
docs/azure/includes/dotnet-all.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md
index 469a605ec9c64..177af8ef423d1 100644
--- a/docs/azure/includes/dotnet-all.md
+++ b/docs/azure/includes/dotnet-all.md
@@ -502,8 +502,8 @@
| Functions extension for Azure SQL and SQL Server | NuGet [3.1.512](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Sql/3.1.512) | | |
| Functions extension for Cosmos DB | NuGet [4.9.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDB/4.9.0) | | GitHub [4.9.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/cosmos-v3.0.7/src/WebJobs.Extensions.CosmosDB) |
| Functions extension for DocumentDB | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DocumentDB/1.3.0) | | GitHub [1.3.0](https://github.com/Azure/azure-webjobs-sdk-extensions) |
-| Functions extension for Durable Task Framework | NuGet [3.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/3.2.0) | [docs](/dotnet/api/overview/azure/functions) | GitHub [3.2.0](https://github.com/Azure/azure-functions-durable-extension/tree/v2.2.2/src/WebJobs.Extensions.DurableTask) |
-| Functions extension for Durable Task Framework - isolated worker | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask/1.4.0) | | |
+| Functions extension for Durable Task Framework | NuGet [3.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/3.3.0) | [docs](/dotnet/api/overview/azure/functions) | GitHub [3.3.0](https://github.com/Azure/azure-functions-durable-extension/tree/v2.2.2/src/WebJobs.Extensions.DurableTask) |
+| Functions extension for Durable Task Framework - isolated worker | NuGet [1.5.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask/1.5.0) | | |
| Functions extension for HTTP | NuGet [3.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Http/3.2.0) | | GitHub [3.2.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.2/src/WebJobs.Extensions.Http) |
| Functions extension for IoT Edge | NuGet [1.0.7](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EdgeHub/1.0.7) | | GitHub [1.0.7](https://github.com/Azure/iotedge/tree/1.0.7/edge-hub) |
| Functions extension for Kafka | NuGet [4.1.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Kafka/4.1.2) | | GitHub [4.1.2](https://github.com/Azure/azure-functions-kafka-extension/tree/3.0.0/src/Microsoft.Azure.WebJobs.Extensions.Kafka) |