From efbc1dc6a9f4f06d9faf4d47c1c2aae8b1e56d5b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:16:07 +0200 Subject: [PATCH 01/32] [release/10.0] Source code updates from dotnet/dotnet (#2665) * Backflow from https://github.com/dotnet/dotnet / f8a57b6 build 279432 [[ commit created by automation ]] * Update dependencies from https://github.com/dotnet/dotnet build 279432 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk (Version 9.0.0-beta.25407.2 -> 9.0.0-beta.25407.2) --------- Co-authored-by: dotnet-maestro[bot] --- eng/Signing.props | 7 +++++++ eng/Version.Details.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 eng/Signing.props diff --git a/eng/Signing.props b/eng/Signing.props new file mode 100644 index 0000000000..f6fb6b798a --- /dev/null +++ b/eng/Signing.props @@ -0,0 +1,7 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3d6346a118..52ad55a750 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,6 +1,6 @@ - + From 4494d98feedcca2b68177236da02b940b04d2fa3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 08:00:22 +0200 Subject: [PATCH 02/32] [main] Source code updates from dotnet/dotnet (#2663) * Update dependencies from https://github.com/dotnet/dotnet build 279079 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk (Version 9.0.0-beta.25407.2 -> 9.0.0-beta.25407.2) * Update dependencies from https://github.com/dotnet/dotnet build 279336 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk (Version 9.0.0-beta.25407.2 -> 9.0.0-beta.25380.1) * Backflow from https://github.com/dotnet/dotnet / 5c3434d build 279843 [[ commit created by automation ]] * Update dependencies from https://github.com/dotnet/dotnet build 279843 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk (Version 9.0.0-beta.25380.1 -> 9.0.0-beta.25407.2) --------- Co-authored-by: dotnet-maestro[bot] --- eng/Signing.props | 7 +++++++ eng/Version.Details.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 eng/Signing.props diff --git a/eng/Signing.props b/eng/Signing.props new file mode 100644 index 0000000000..f6fb6b798a --- /dev/null +++ b/eng/Signing.props @@ -0,0 +1,7 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3d6346a118..0e0ee88bfd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,6 +1,6 @@ - + From fab13a397461f4ff16b988ba96cb08891ac75257 Mon Sep 17 00:00:00 2001 From: Mike Atkisson Date: Wed, 27 Aug 2025 12:46:16 -0400 Subject: [PATCH 03/32] Re-add default value on ProcessTerminationTimeout (#2672) Co-authored-by: Michael Atkisson --- src/System.CommandLine/InvocationConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.CommandLine/InvocationConfiguration.cs b/src/System.CommandLine/InvocationConfiguration.cs index a7eaeedd85..9338503bee 100644 --- a/src/System.CommandLine/InvocationConfiguration.cs +++ b/src/System.CommandLine/InvocationConfiguration.cs @@ -18,7 +18,7 @@ public class InvocationConfiguration /// that can be passed to a during invocation. /// If not provided, a default timeout of 2 seconds is enforced. /// - public TimeSpan? ProcessTerminationTimeout { get; set; } + public TimeSpan? ProcessTerminationTimeout { get; set; } = TimeSpan.FromSeconds(2); /// /// The standard output. Used by Help and other facilities that write non-error information. From a3f58f694c5b1c497defb1777ab0f345a7dc51cd Mon Sep 17 00:00:00 2001 From: Mike Atkisson Date: Wed, 27 Aug 2025 12:46:16 -0400 Subject: [PATCH 04/32] Re-add default value on ProcessTerminationTimeout (#2672) Co-authored-by: Michael Atkisson --- src/System.CommandLine/InvocationConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.CommandLine/InvocationConfiguration.cs b/src/System.CommandLine/InvocationConfiguration.cs index a7eaeedd85..9338503bee 100644 --- a/src/System.CommandLine/InvocationConfiguration.cs +++ b/src/System.CommandLine/InvocationConfiguration.cs @@ -18,7 +18,7 @@ public class InvocationConfiguration /// that can be passed to a during invocation. /// If not provided, a default timeout of 2 seconds is enforced. /// - public TimeSpan? ProcessTerminationTimeout { get; set; } + public TimeSpan? ProcessTerminationTimeout { get; set; } = TimeSpan.FromSeconds(2); /// /// The standard output. Used by Help and other facilities that write non-error information. From a36a957392c4dd1b23319df5ca29ebaccfdabd07 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 3 Sep 2025 18:22:58 -0500 Subject: [PATCH 05/32] Make a README for the core package --- src/System.CommandLine/README.md | 227 ++++++++++++++++++ .../System.CommandLine.csproj | 2 + 2 files changed, 229 insertions(+) create mode 100644 src/System.CommandLine/README.md diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md new file mode 100644 index 0000000000..f5d6bcd941 --- /dev/null +++ b/src/System.CommandLine/README.md @@ -0,0 +1,227 @@ +# System.CommandLine + +System.CommandLine provides robust support for command-line parsing, invocation, and shell completions in .NET applications. It supports both POSIX and Windows conventions, making it easy to build professional command-line interfaces. + +## Getting Started + +### Basic Command + +Here's a simple "Hello World" command-line application: + +```csharp +using System.CommandLine; + +var rootCommand = new RootCommand("Sample command-line app"); + +var nameOption = new Option( + aliases: ["--name", "-n"], + description: "Your name"); + +rootCommand.Options.Add(nameOption); + +rootCommand.SetAction(parseResult => +{ + string name = parseResult.GetValueForOption(nameOption); + Console.WriteLine($"Hello, {name ?? "World"}!"); +}); + +return await rootCommand.InvokeAsync(args); +``` + +### Commands with Arguments + +Arguments are values passed directly to commands without option names: + +```csharp +var fileArgument = new Argument( + name: "file", + description: "The file to process"); + +var processCommand = new Command("process", "Process a file"); +processCommand.Arguments.Add(fileArgument); + +processCommand.SetAction(parseResult => +{ + FileInfo file = parseResult.GetValueForArgument(fileArgument); + Console.WriteLine($"Processing {file.FullName}"); +}); + +rootCommand.Subcommands.Add(processCommand); +``` + +### Options with Default Values + +Options can have default values and validation: + +```csharp +var delayOption = new Option( + aliases: ["--delay", "-d"], + getDefaultValue: () => 1000, + description: "Delay in milliseconds"); + +delayOption.AddValidator(result => +{ + if (result.GetValueOrDefault() < 0) + { + result.ErrorMessage = "Delay must be non-negative"; + } +}); + +rootCommand.Options.Add(delayOption); +``` + +### Subcommands + +Build complex CLI applications with nested commands: + +```csharp +var rootCommand = new RootCommand("My application"); + +var configCommand = new Command("config", "Configure the application"); +var configSetCommand = new Command("set", "Set a configuration value"); +var configGetCommand = new Command("get", "Get a configuration value"); + +var keyOption = new Option("--key", "Configuration key"); +var valueOption = new Option("--value", "Configuration value"); + +configSetCommand.Options.Add(keyOption); +configSetCommand.Options.Add(valueOption); +configGetCommand.Options.Add(keyOption); + +configCommand.Subcommands.Add(configSetCommand); +configCommand.Subcommands.Add(configGetCommand); +rootCommand.Subcommands.Add(configCommand); + +// Usage: myapp config set --key "apiUrl" --value "https://api.example.com" +// Usage: myapp config get --key "apiUrl" +``` + +### Using Options in Command Handlers + +Access option values through the ParseResult: + +```csharp +var connectionOption = new Option("--connection", "Database connection string"); +var timeoutOption = new Option("--timeout", getDefaultValue: () => 30); +var verboseOption = new Option("--verbose"); + +rootCommand.Options.Add(connectionOption); +rootCommand.Options.Add(timeoutOption); +rootCommand.Options.Add(verboseOption); + +rootCommand.SetAction(parseResult => +{ + var connection = parseResult.GetValueForOption(connectionOption); + var timeout = parseResult.GetValueForOption(timeoutOption); + var verbose = parseResult.GetValueForOption(verboseOption); + + Console.WriteLine($"Connection: {connection}"); + Console.WriteLine($"Timeout: {timeout}"); + Console.WriteLine($"Verbose: {verbose}"); +}); +``` + +### Shell Completions + +Enable tab completion for your CLI: + +```csharp +// Completions are automatically available for all commands, options, and arguments +var rootCommand = new RootCommand("My app with completions"); + +var fileOption = new Option("--file", "The file to process"); +fileOption.AddCompletions((ctx) => +{ + // Custom completion logic + return new[] { "file1.txt", "file2.txt", "file3.txt" }; +}); + +rootCommand.Options.Add(fileOption); + +// Users can generate completion scripts using dotnet-suggest: +// dotnet tool install -g dotnet-suggest +// dotnet suggest script bash > ~/.bashrc +// dotnet suggest script powershell > $PROFILE +``` + +### Async Command Handlers + +Support for asynchronous operations: + +```csharp +var urlOption = new Option("--url", "The URL to fetch"); +rootCommand.Options.Add(urlOption); + +rootCommand.SetAction(async (parseResult, cancellationToken) => +{ + var url = parseResult.GetValueForOption(urlOption); + if (url != null) + { + using var client = new HttpClient(); + var response = await client.GetStringAsync(url, cancellationToken); + Console.WriteLine(response); + } +}); + +// Or return an exit code: +rootCommand.SetAction(async (parseResult, cancellationToken) => +{ + // Your async logic here + return await Task.FromResult(0); // Return exit code +}); +``` + +## Notable Changes Since v2.0.0-beta7 + +### New Features +- **Finnish Localization**: Added Finnish language translations for help text and error messages ([#2605](https://github.com/dotnet/command-line-api/pull/2605)) +- **Improved Help System**: Enhanced `HelpAction` to allow users to provide custom `MaxWidth` for help text formatting ([#2635](https://github.com/dotnet/command-line-api/pull/2635)) +- **Task Support**: Added `SetAction` overload for `Task` return types ([#2634](https://github.com/dotnet/command-line-api/issues/2634)) +- **Implicit Arguments**: Added `ArgumentResult.Implicit` property for better argument handling ([#2622](https://github.com/dotnet/command-line-api/issues/2622), [#2625](https://github.com/dotnet/command-line-api/pull/2625)) +- **Performance Improvements**: Reduced reflection usage throughout the library for better performance ([#2662](https://github.com/dotnet/command-line-api/pull/2662)) + +### Bug Fixes +- Fixed issue [#2128](https://github.com/dotnet/command-line-api/issues/2128): Resolved command parsing edge cases ([#2656](https://github.com/dotnet/command-line-api/pull/2656)) +- Fixed issue [#2257](https://github.com/dotnet/command-line-api/issues/2257): Corrected argument validation behavior +- Fixed issue [#2589](https://github.com/dotnet/command-line-api/issues/2589): Improved error message clarity ([#2654](https://github.com/dotnet/command-line-api/pull/2654)) +- Fixed issue [#2591](https://github.com/dotnet/command-line-api/issues/2591): Resolved option parsing inconsistencies ([#2644](https://github.com/dotnet/command-line-api/pull/2644)) +- Fixed issue [#2622](https://github.com/dotnet/command-line-api/issues/2622): Enhanced implicit argument support ([#2625](https://github.com/dotnet/command-line-api/pull/2625)) +- Fixed issue [#2628](https://github.com/dotnet/command-line-api/issues/2628): Corrected help text formatting issues +- Fixed issue [#2634](https://github.com/dotnet/command-line-api/issues/2634): Added missing Task action support +- Fixed issue [#2640](https://github.com/dotnet/command-line-api/issues/2640): Resolved completion suggestions for nested commands ([#2646](https://github.com/dotnet/command-line-api/pull/2646)) + +### Breaking Changes +- Default value handling for `ProcessTerminationTimeout` has been re-added ([#2672](https://github.com/dotnet/command-line-api/pull/2672)) +- Some internal APIs have been refactored to reduce reflection usage ([#2662](https://github.com/dotnet/command-line-api/pull/2662)) + +### Other Improvements +- Updated to .NET 10.0 RC1 compatibility +- Enhanced parsing logic for better POSIX and Windows convention support +- Improved memory usage and performance optimizations +- Better handling of complex command hierarchies + +## Documentation + +For comprehensive documentation, tutorials, and API reference, visit: +- **[Microsoft Learn Documentation](https://learn.microsoft.com/en-us/dotnet/standard/commandline/)** - Complete guides and API reference +- **[GitHub Repository](https://github.com/dotnet/command-line-api)** - Source code, samples, and issues +- **[Sample Applications](https://github.com/dotnet/command-line-api/tree/main/samples)** - Real-world examples + +## Framework Support + +- **.NET 8.0+** - Full feature support with trimming and AOT compilation +- **.NET Standard 2.0** - Compatible with .NET Framework 4.6.1+, .NET Core 2.0+ + +## License + +This package is licensed under the [MIT License](https://opensource.org/licenses/MIT). + +## Contributing + +We welcome contributions! Please see our [Contributing Guide](https://github.com/dotnet/command-line-api/blob/main/CONTRIBUTING.md) for details. + +## Support + +- **Issues**: [GitHub Issues](https://github.com/dotnet/command-line-api/issues) +- **Discussions**: [GitHub Discussions](https://github.com/dotnet/command-line-api/discussions) +- **Chat**: [Gitter Community](https://gitter.im/dotnet/command-line-api) \ No newline at end of file diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj index 09fd8f326a..1d86feebc4 100644 --- a/src/System.CommandLine/System.CommandLine.csproj +++ b/src/System.CommandLine/System.CommandLine.csproj @@ -7,6 +7,7 @@ Support for parsing command lines, supporting both POSIX and Windows conventions and shell-agnostic command line completions. true portable + README.md @@ -17,6 +18,7 @@ + From a87274c88798cd806e77149bf713158b8c916992 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 3 Sep 2025 18:57:51 -0500 Subject: [PATCH 06/32] fix API usage in the README --- src/System.CommandLine/README.md | 65 +++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md index f5d6bcd941..a933fcd96d 100644 --- a/src/System.CommandLine/README.md +++ b/src/System.CommandLine/README.md @@ -13,9 +13,10 @@ using System.CommandLine; var rootCommand = new RootCommand("Sample command-line app"); -var nameOption = new Option( - aliases: ["--name", "-n"], - description: "Your name"); +var nameOption = new Option("--name", "-n") +{ + Description = "Your name" +}; rootCommand.Options.Add(nameOption); @@ -25,7 +26,7 @@ rootCommand.SetAction(parseResult => Console.WriteLine($"Hello, {name ?? "World"}!"); }); -return await rootCommand.InvokeAsync(args); +return await rootCommand.Parse(args).InvokeAsync(); ``` ### Commands with Arguments @@ -54,10 +55,11 @@ rootCommand.Subcommands.Add(processCommand); Options can have default values and validation: ```csharp -var delayOption = new Option( - aliases: ["--delay", "-d"], - getDefaultValue: () => 1000, - description: "Delay in milliseconds"); +var delayOption = new Option("--delay", "-d") +{ + Description = "Delay in milliseconds", + DefaultValueFactory = _ => 1000 +}; delayOption.AddValidator(result => { @@ -81,8 +83,14 @@ var configCommand = new Command("config", "Configure the application"); var configSetCommand = new Command("set", "Set a configuration value"); var configGetCommand = new Command("get", "Get a configuration value"); -var keyOption = new Option("--key", "Configuration key"); -var valueOption = new Option("--value", "Configuration value"); +var keyOption = new Option("--key") +{ + Description = "Configuration key" +}; +var valueOption = new Option("--value") +{ + Description = "Configuration value" +}; configSetCommand.Options.Add(keyOption); configSetCommand.Options.Add(valueOption); @@ -101,9 +109,19 @@ rootCommand.Subcommands.Add(configCommand); Access option values through the ParseResult: ```csharp -var connectionOption = new Option("--connection", "Database connection string"); -var timeoutOption = new Option("--timeout", getDefaultValue: () => 30); -var verboseOption = new Option("--verbose"); +var connectionOption = new Option("--connection") +{ + Description = "Database connection string" +}; +var timeoutOption = new Option("--timeout") +{ + Description = "Timeout in seconds", + DefaultValueFactory = _ => 30 +}; +var verboseOption = new Option("--verbose") +{ + Description = "Enable verbose output" +}; rootCommand.Options.Add(connectionOption); rootCommand.Options.Add(timeoutOption); @@ -129,19 +147,27 @@ Enable tab completion for your CLI: // Completions are automatically available for all commands, options, and arguments var rootCommand = new RootCommand("My app with completions"); -var fileOption = new Option("--file", "The file to process"); -fileOption.AddCompletions((ctx) => +var fileOption = new Option("--file") +{ + Description = "The file to process" +}; + +// Add custom completions using CompletionSources +fileOption.CompletionSources.Add(ctx => { - // Custom completion logic + // Custom completion logic - return completion suggestions return new[] { "file1.txt", "file2.txt", "file3.txt" }; }); +// Or add simple string suggestions +fileOption.CompletionSources.Add("option1", "option2", "option3"); + rootCommand.Options.Add(fileOption); // Users can generate completion scripts using dotnet-suggest: // dotnet tool install -g dotnet-suggest // dotnet suggest script bash > ~/.bashrc -// dotnet suggest script powershell > $PROFILE +// dotnet suggest script powershell >> $PROFILE ``` ### Async Command Handlers @@ -149,7 +175,10 @@ rootCommand.Options.Add(fileOption); Support for asynchronous operations: ```csharp -var urlOption = new Option("--url", "The URL to fetch"); +var urlOption = new Option("--url") +{ + Description = "The URL to fetch" +}; rootCommand.Options.Add(urlOption); rootCommand.SetAction(async (parseResult, cancellationToken) => From 9b885584164947a0be7ff17abc21b8c49d98ead0 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 10 Sep 2025 11:57:14 -0500 Subject: [PATCH 07/32] Update code samples and text based on review + feedback. --- src/System.CommandLine/README.md | 64 ++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md index a933fcd96d..a4fcb3f78f 100644 --- a/src/System.CommandLine/README.md +++ b/src/System.CommandLine/README.md @@ -22,7 +22,7 @@ rootCommand.Options.Add(nameOption); rootCommand.SetAction(parseResult => { - string name = parseResult.GetValueForOption(nameOption); + string name = parseResult.GetValue(nameOption); Console.WriteLine($"Hello, {name ?? "World"}!"); }); @@ -34,19 +34,22 @@ return await rootCommand.Parse(args).InvokeAsync(); Arguments are values passed directly to commands without option names: ```csharp -var fileArgument = new Argument( - name: "file", - description: "The file to process"); +var fileArgument = new Argument("file") +{ + Description = "The file to process" +}; var processCommand = new Command("process", "Process a file"); processCommand.Arguments.Add(fileArgument); processCommand.SetAction(parseResult => { - FileInfo file = parseResult.GetValueForArgument(fileArgument); + FileInfo file = parseResult.GetValue(fileArgument); Console.WriteLine($"Processing {file.FullName}"); }); +var rootCommand = new RootCommand(); + rootCommand.Subcommands.Add(processCommand); ``` @@ -55,17 +58,19 @@ rootCommand.Subcommands.Add(processCommand); Options can have default values and validation: ```csharp +var rootCommand = new RootCommand(); + var delayOption = new Option("--delay", "-d") { Description = "Delay in milliseconds", DefaultValueFactory = _ => 1000 }; -delayOption.AddValidator(result => +delayOption.Validators.Add(result => { if (result.GetValueOrDefault() < 0) { - result.ErrorMessage = "Delay must be non-negative"; + result.AddError("Delay must be non-negative"); } }); @@ -129,9 +134,9 @@ rootCommand.Options.Add(verboseOption); rootCommand.SetAction(parseResult => { - var connection = parseResult.GetValueForOption(connectionOption); - var timeout = parseResult.GetValueForOption(timeoutOption); - var verbose = parseResult.GetValueForOption(verboseOption); + var connection = parseResult.GetValue(connectionOption); + var timeout = parseResult.GetValue(timeoutOption); + var verbose = parseResult.GetValue(verboseOption); Console.WriteLine($"Connection: {connection}"); Console.WriteLine($"Timeout: {timeout}"); @@ -154,22 +159,36 @@ var fileOption = new Option("--file") // Add custom completions using CompletionSources fileOption.CompletionSources.Add(ctx => -{ - // Custom completion logic - return completion suggestions - return new[] { "file1.txt", "file2.txt", "file3.txt" }; -}); + // hard-coded list of files + ["file1.txt", "file2.txt", "file3.txt" ] +); // Or add simple string suggestions fileOption.CompletionSources.Add("option1", "option2", "option3"); rootCommand.Options.Add(fileOption); +``` -// Users can generate completion scripts using dotnet-suggest: -// dotnet tool install -g dotnet-suggest -// dotnet suggest script bash > ~/.bashrc -// dotnet suggest script powershell >> $PROFILE +Users can then easily trigger your completions using `dotnet-suggest`: + +```shell +> dotnet tool install -g dotnet-suggest +> dotnet suggest script bash > ~/.bashrc +``` + +```powershell +> dotnet tool install -g dotnet-suggest +> dotnet suggest script powershell >> $PROFILE ``` +Once `dotnet-suggest` is installed, you can register your app with it for completions support: + +```shell +> dotnet-suggest register --command-path /path/to/myapp +``` + +Alternatively, you can create your own commands for completion generation and instruct users on how to set them up. + ### Async Command Handlers Support for asynchronous operations: @@ -183,7 +202,7 @@ rootCommand.Options.Add(urlOption); rootCommand.SetAction(async (parseResult, cancellationToken) => { - var url = parseResult.GetValueForOption(urlOption); + var url = parseResult.GetValue(urlOption); if (url != null) { using var client = new HttpClient(); @@ -204,9 +223,9 @@ rootCommand.SetAction(async (parseResult, cancellationToken) => ### New Features - **Finnish Localization**: Added Finnish language translations for help text and error messages ([#2605](https://github.com/dotnet/command-line-api/pull/2605)) -- **Improved Help System**: Enhanced `HelpAction` to allow users to provide custom `MaxWidth` for help text formatting ([#2635](https://github.com/dotnet/command-line-api/pull/2635)) -- **Task Support**: Added `SetAction` overload for `Task` return types ([#2634](https://github.com/dotnet/command-line-api/issues/2634)) -- **Implicit Arguments**: Added `ArgumentResult.Implicit` property for better argument handling ([#2622](https://github.com/dotnet/command-line-api/issues/2622), [#2625](https://github.com/dotnet/command-line-api/pull/2625)) +- **Improved Help System**: Enhanced `HelpAction` to allow users to provide custom `MaxWidth` for help text formatting ([#2635](https://github.com/dotnet/command-line-api/pull/2635)). Note that if you create custom Help or Version actions, you'll want to set `ClearsParseErrors` to `true` to ensure that invoking those features isn't treated like an error by the parser. +- **`Task` Support**: Added `SetAction` overload for `Task` return types ([#2634](https://github.com/dotnet/command-line-api/issues/2634)) +- **Detect Implicit Arguments**: Added the `ArgumentResult.Implicit` property for better argument handling ([#2622](https://github.com/dotnet/command-line-api/issues/2622), [#2625](https://github.com/dotnet/command-line-api/pull/2625)) - **Performance Improvements**: Reduced reflection usage throughout the library for better performance ([#2662](https://github.com/dotnet/command-line-api/pull/2662)) ### Bug Fixes @@ -225,7 +244,6 @@ rootCommand.SetAction(async (parseResult, cancellationToken) => ### Other Improvements - Updated to .NET 10.0 RC1 compatibility -- Enhanced parsing logic for better POSIX and Windows convention support - Improved memory usage and performance optimizations - Better handling of complex command hierarchies From 3472eda4b1692610e3abd63c6472b454e2b017cc Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Thu, 11 Sep 2025 10:18:23 -0500 Subject: [PATCH 08/32] Apply suggestions from code review Co-authored-by: Adam Sitnik --- src/System.CommandLine/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md index a4fcb3f78f..4826347c7a 100644 --- a/src/System.CommandLine/README.md +++ b/src/System.CommandLine/README.md @@ -11,9 +11,9 @@ Here's a simple "Hello World" command-line application: ```csharp using System.CommandLine; -var rootCommand = new RootCommand("Sample command-line app"); +RootCommand rootCommand = new("Sample command-line app"); -var nameOption = new Option("--name", "-n") +Option nameOption = new("--name", "-n") { Description = "Your name" }; @@ -26,7 +26,7 @@ rootCommand.SetAction(parseResult => Console.WriteLine($"Hello, {name ?? "World"}!"); }); -return await rootCommand.Parse(args).InvokeAsync(); +return rootCommand.Parse(args).Invoke(); ``` ### Commands with Arguments @@ -109,7 +109,7 @@ rootCommand.Subcommands.Add(configCommand); // Usage: myapp config get --key "apiUrl" ``` -### Using Options in Command Handlers +### Using Options in Command Actions Access option values through the ParseResult: From 7ccb27f051019cdd555eeacae5b37599f0a4f411 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Thu, 11 Sep 2025 10:22:07 -0500 Subject: [PATCH 09/32] Clarify what RootCommand does --- src/System.CommandLine/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md index 4826347c7a..45ce68c93a 100644 --- a/src/System.CommandLine/README.md +++ b/src/System.CommandLine/README.md @@ -29,6 +29,14 @@ rootCommand.SetAction(parseResult => return rootCommand.Parse(args).Invoke(); ``` +In this example, we create a `RootCommand`, add an option for the user's name, and define an action that prints a greeting. The `RootCommand` is a special kind of `Command` that comes with a few predefined behaviors: + +* It discovers its name automatically from the currently-running application +* It automatically provides `--help` and `--version` options and default behaviors for them +* It provides a default integration with `dotnet-suggest` for dynamic [shell completions](#shell-completions) + +You can always override or customize these behaviors as needed on a `RootCommand`, or create your own top-level `Command` instead. + ### Commands with Arguments Arguments are values passed directly to commands without option names: From 66ba9524ad56ae12e03affbf119334a0a96a97cb Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Thu, 25 Sep 2025 15:09:24 -0500 Subject: [PATCH 10/32] remove mention of Finnish translation as it's not yet in the package --- src/System.CommandLine/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md index 45ce68c93a..83b870c93f 100644 --- a/src/System.CommandLine/README.md +++ b/src/System.CommandLine/README.md @@ -230,7 +230,6 @@ rootCommand.SetAction(async (parseResult, cancellationToken) => ## Notable Changes Since v2.0.0-beta7 ### New Features -- **Finnish Localization**: Added Finnish language translations for help text and error messages ([#2605](https://github.com/dotnet/command-line-api/pull/2605)) - **Improved Help System**: Enhanced `HelpAction` to allow users to provide custom `MaxWidth` for help text formatting ([#2635](https://github.com/dotnet/command-line-api/pull/2635)). Note that if you create custom Help or Version actions, you'll want to set `ClearsParseErrors` to `true` to ensure that invoking those features isn't treated like an error by the parser. - **`Task` Support**: Added `SetAction` overload for `Task` return types ([#2634](https://github.com/dotnet/command-line-api/issues/2634)) - **Detect Implicit Arguments**: Added the `ArgumentResult.Implicit` property for better argument handling ([#2622](https://github.com/dotnet/command-line-api/issues/2622), [#2625](https://github.com/dotnet/command-line-api/pull/2625)) From f03fc0c1b8615642220fe567bbbbec552c0241ca Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Thu, 25 Sep 2025 15:10:19 -0500 Subject: [PATCH 11/32] remove mention of gitter --- src/System.CommandLine/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md index 83b870c93f..51341c0a65 100644 --- a/src/System.CommandLine/README.md +++ b/src/System.CommandLine/README.md @@ -277,5 +277,4 @@ We welcome contributions! Please see our [Contributing Guide](https://github.com ## Support - **Issues**: [GitHub Issues](https://github.com/dotnet/command-line-api/issues) -- **Discussions**: [GitHub Discussions](https://github.com/dotnet/command-line-api/discussions) -- **Chat**: [Gitter Community](https://gitter.im/dotnet/command-line-api) \ No newline at end of file +- **Discussions**: [GitHub Discussions](https://github.com/dotnet/command-line-api/discussions) \ No newline at end of file From 4e0ad95ed94307c9b15d1507ba8e8849619106a8 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Thu, 25 Sep 2025 15:11:52 -0500 Subject: [PATCH 12/32] remove dead link --- src/System.CommandLine/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md index 51341c0a65..da48b892a3 100644 --- a/src/System.CommandLine/README.md +++ b/src/System.CommandLine/README.md @@ -259,7 +259,6 @@ rootCommand.SetAction(async (parseResult, cancellationToken) => For comprehensive documentation, tutorials, and API reference, visit: - **[Microsoft Learn Documentation](https://learn.microsoft.com/en-us/dotnet/standard/commandline/)** - Complete guides and API reference - **[GitHub Repository](https://github.com/dotnet/command-line-api)** - Source code, samples, and issues -- **[Sample Applications](https://github.com/dotnet/command-line-api/tree/main/samples)** - Real-world examples ## Framework Support From 18a0a547e191c6f39baeddaaf59dd12ab9d32469 Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Fri, 26 Sep 2025 12:37:09 -0700 Subject: [PATCH 13/32] Augment and correct the Option.HelpName API docs (#2687) --- src/System.CommandLine/Option.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/System.CommandLine/Option.cs b/src/System.CommandLine/Option.cs index bac26af4a2..66ac89bdd3 100644 --- a/src/System.CommandLine/Option.cs +++ b/src/System.CommandLine/Option.cs @@ -41,12 +41,22 @@ protected Option(string name, string[] aliases) : base(name) public bool HasDefaultValue => Argument.HasDefaultValue; /// - /// Gets or sets the name of the Option when displayed in help. + /// Gets or sets the placeholder name shown in usage help for the option's value. + /// The value will be wrapped in angle brackets (< and >). /// + /// + /// If null, the of the option will be used, + /// with leading dashes and slashes removed. + /// + /// + /// An option with of --option and a + /// of Value will be shown in usage help as: + /// --option <Value>. If is not set, + /// help output will show: --option <option>. + /// /// - /// The name of the option when displayed in help. + /// The name to show as the placeholder for the option's value. /// - /// Useful for localization, as it's not used for actual parsing. public string? HelpName { get => Argument.HelpName; From 2464766dba93d0f1f8ff5f3fc16116abc3f908ae Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Fri, 26 Sep 2025 10:16:05 -0500 Subject: [PATCH 14/32] Merge pull request #2679 from dotnet/add-package-readme [release/10.0] Add package readme for the core System.CommandLine package --- src/System.CommandLine/README.md | 279 ++++++++++++++++++ .../System.CommandLine.csproj | 2 + 2 files changed, 281 insertions(+) create mode 100644 src/System.CommandLine/README.md diff --git a/src/System.CommandLine/README.md b/src/System.CommandLine/README.md new file mode 100644 index 0000000000..da48b892a3 --- /dev/null +++ b/src/System.CommandLine/README.md @@ -0,0 +1,279 @@ +# System.CommandLine + +System.CommandLine provides robust support for command-line parsing, invocation, and shell completions in .NET applications. It supports both POSIX and Windows conventions, making it easy to build professional command-line interfaces. + +## Getting Started + +### Basic Command + +Here's a simple "Hello World" command-line application: + +```csharp +using System.CommandLine; + +RootCommand rootCommand = new("Sample command-line app"); + +Option nameOption = new("--name", "-n") +{ + Description = "Your name" +}; + +rootCommand.Options.Add(nameOption); + +rootCommand.SetAction(parseResult => +{ + string name = parseResult.GetValue(nameOption); + Console.WriteLine($"Hello, {name ?? "World"}!"); +}); + +return rootCommand.Parse(args).Invoke(); +``` + +In this example, we create a `RootCommand`, add an option for the user's name, and define an action that prints a greeting. The `RootCommand` is a special kind of `Command` that comes with a few predefined behaviors: + +* It discovers its name automatically from the currently-running application +* It automatically provides `--help` and `--version` options and default behaviors for them +* It provides a default integration with `dotnet-suggest` for dynamic [shell completions](#shell-completions) + +You can always override or customize these behaviors as needed on a `RootCommand`, or create your own top-level `Command` instead. + +### Commands with Arguments + +Arguments are values passed directly to commands without option names: + +```csharp +var fileArgument = new Argument("file") +{ + Description = "The file to process" +}; + +var processCommand = new Command("process", "Process a file"); +processCommand.Arguments.Add(fileArgument); + +processCommand.SetAction(parseResult => +{ + FileInfo file = parseResult.GetValue(fileArgument); + Console.WriteLine($"Processing {file.FullName}"); +}); + +var rootCommand = new RootCommand(); + +rootCommand.Subcommands.Add(processCommand); +``` + +### Options with Default Values + +Options can have default values and validation: + +```csharp +var rootCommand = new RootCommand(); + +var delayOption = new Option("--delay", "-d") +{ + Description = "Delay in milliseconds", + DefaultValueFactory = _ => 1000 +}; + +delayOption.Validators.Add(result => +{ + if (result.GetValueOrDefault() < 0) + { + result.AddError("Delay must be non-negative"); + } +}); + +rootCommand.Options.Add(delayOption); +``` + +### Subcommands + +Build complex CLI applications with nested commands: + +```csharp +var rootCommand = new RootCommand("My application"); + +var configCommand = new Command("config", "Configure the application"); +var configSetCommand = new Command("set", "Set a configuration value"); +var configGetCommand = new Command("get", "Get a configuration value"); + +var keyOption = new Option("--key") +{ + Description = "Configuration key" +}; +var valueOption = new Option("--value") +{ + Description = "Configuration value" +}; + +configSetCommand.Options.Add(keyOption); +configSetCommand.Options.Add(valueOption); +configGetCommand.Options.Add(keyOption); + +configCommand.Subcommands.Add(configSetCommand); +configCommand.Subcommands.Add(configGetCommand); +rootCommand.Subcommands.Add(configCommand); + +// Usage: myapp config set --key "apiUrl" --value "https://api.example.com" +// Usage: myapp config get --key "apiUrl" +``` + +### Using Options in Command Actions + +Access option values through the ParseResult: + +```csharp +var connectionOption = new Option("--connection") +{ + Description = "Database connection string" +}; +var timeoutOption = new Option("--timeout") +{ + Description = "Timeout in seconds", + DefaultValueFactory = _ => 30 +}; +var verboseOption = new Option("--verbose") +{ + Description = "Enable verbose output" +}; + +rootCommand.Options.Add(connectionOption); +rootCommand.Options.Add(timeoutOption); +rootCommand.Options.Add(verboseOption); + +rootCommand.SetAction(parseResult => +{ + var connection = parseResult.GetValue(connectionOption); + var timeout = parseResult.GetValue(timeoutOption); + var verbose = parseResult.GetValue(verboseOption); + + Console.WriteLine($"Connection: {connection}"); + Console.WriteLine($"Timeout: {timeout}"); + Console.WriteLine($"Verbose: {verbose}"); +}); +``` + +### Shell Completions + +Enable tab completion for your CLI: + +```csharp +// Completions are automatically available for all commands, options, and arguments +var rootCommand = new RootCommand("My app with completions"); + +var fileOption = new Option("--file") +{ + Description = "The file to process" +}; + +// Add custom completions using CompletionSources +fileOption.CompletionSources.Add(ctx => + // hard-coded list of files + ["file1.txt", "file2.txt", "file3.txt" ] +); + +// Or add simple string suggestions +fileOption.CompletionSources.Add("option1", "option2", "option3"); + +rootCommand.Options.Add(fileOption); +``` + +Users can then easily trigger your completions using `dotnet-suggest`: + +```shell +> dotnet tool install -g dotnet-suggest +> dotnet suggest script bash > ~/.bashrc +``` + +```powershell +> dotnet tool install -g dotnet-suggest +> dotnet suggest script powershell >> $PROFILE +``` + +Once `dotnet-suggest` is installed, you can register your app with it for completions support: + +```shell +> dotnet-suggest register --command-path /path/to/myapp +``` + +Alternatively, you can create your own commands for completion generation and instruct users on how to set them up. + +### Async Command Handlers + +Support for asynchronous operations: + +```csharp +var urlOption = new Option("--url") +{ + Description = "The URL to fetch" +}; +rootCommand.Options.Add(urlOption); + +rootCommand.SetAction(async (parseResult, cancellationToken) => +{ + var url = parseResult.GetValue(urlOption); + if (url != null) + { + using var client = new HttpClient(); + var response = await client.GetStringAsync(url, cancellationToken); + Console.WriteLine(response); + } +}); + +// Or return an exit code: +rootCommand.SetAction(async (parseResult, cancellationToken) => +{ + // Your async logic here + return await Task.FromResult(0); // Return exit code +}); +``` + +## Notable Changes Since v2.0.0-beta7 + +### New Features +- **Improved Help System**: Enhanced `HelpAction` to allow users to provide custom `MaxWidth` for help text formatting ([#2635](https://github.com/dotnet/command-line-api/pull/2635)). Note that if you create custom Help or Version actions, you'll want to set `ClearsParseErrors` to `true` to ensure that invoking those features isn't treated like an error by the parser. +- **`Task` Support**: Added `SetAction` overload for `Task` return types ([#2634](https://github.com/dotnet/command-line-api/issues/2634)) +- **Detect Implicit Arguments**: Added the `ArgumentResult.Implicit` property for better argument handling ([#2622](https://github.com/dotnet/command-line-api/issues/2622), [#2625](https://github.com/dotnet/command-line-api/pull/2625)) +- **Performance Improvements**: Reduced reflection usage throughout the library for better performance ([#2662](https://github.com/dotnet/command-line-api/pull/2662)) + +### Bug Fixes +- Fixed issue [#2128](https://github.com/dotnet/command-line-api/issues/2128): Resolved command parsing edge cases ([#2656](https://github.com/dotnet/command-line-api/pull/2656)) +- Fixed issue [#2257](https://github.com/dotnet/command-line-api/issues/2257): Corrected argument validation behavior +- Fixed issue [#2589](https://github.com/dotnet/command-line-api/issues/2589): Improved error message clarity ([#2654](https://github.com/dotnet/command-line-api/pull/2654)) +- Fixed issue [#2591](https://github.com/dotnet/command-line-api/issues/2591): Resolved option parsing inconsistencies ([#2644](https://github.com/dotnet/command-line-api/pull/2644)) +- Fixed issue [#2622](https://github.com/dotnet/command-line-api/issues/2622): Enhanced implicit argument support ([#2625](https://github.com/dotnet/command-line-api/pull/2625)) +- Fixed issue [#2628](https://github.com/dotnet/command-line-api/issues/2628): Corrected help text formatting issues +- Fixed issue [#2634](https://github.com/dotnet/command-line-api/issues/2634): Added missing Task action support +- Fixed issue [#2640](https://github.com/dotnet/command-line-api/issues/2640): Resolved completion suggestions for nested commands ([#2646](https://github.com/dotnet/command-line-api/pull/2646)) + +### Breaking Changes +- Default value handling for `ProcessTerminationTimeout` has been re-added ([#2672](https://github.com/dotnet/command-line-api/pull/2672)) +- Some internal APIs have been refactored to reduce reflection usage ([#2662](https://github.com/dotnet/command-line-api/pull/2662)) + +### Other Improvements +- Updated to .NET 10.0 RC1 compatibility +- Improved memory usage and performance optimizations +- Better handling of complex command hierarchies + +## Documentation + +For comprehensive documentation, tutorials, and API reference, visit: +- **[Microsoft Learn Documentation](https://learn.microsoft.com/en-us/dotnet/standard/commandline/)** - Complete guides and API reference +- **[GitHub Repository](https://github.com/dotnet/command-line-api)** - Source code, samples, and issues + +## Framework Support + +- **.NET 8.0+** - Full feature support with trimming and AOT compilation +- **.NET Standard 2.0** - Compatible with .NET Framework 4.6.1+, .NET Core 2.0+ + +## License + +This package is licensed under the [MIT License](https://opensource.org/licenses/MIT). + +## Contributing + +We welcome contributions! Please see our [Contributing Guide](https://github.com/dotnet/command-line-api/blob/main/CONTRIBUTING.md) for details. + +## Support + +- **Issues**: [GitHub Issues](https://github.com/dotnet/command-line-api/issues) +- **Discussions**: [GitHub Discussions](https://github.com/dotnet/command-line-api/discussions) \ No newline at end of file diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj index 09fd8f326a..1d86feebc4 100644 --- a/src/System.CommandLine/System.CommandLine.csproj +++ b/src/System.CommandLine/System.CommandLine.csproj @@ -7,6 +7,7 @@ Support for parsing command lines, supporting both POSIX and Windows conventions and shell-agnostic command line completions. true portable + README.md @@ -17,6 +18,7 @@ + From 76b4ef320621cd3b1a5ca01cbc6ea691e6c1bd7a Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 29 Sep 2025 16:44:24 +0200 Subject: [PATCH 15/32] Add backport.yml and flow configuration (#2689) * Add backport.yml and flow configuration This allows to use the /backport command and to automatically open forward flow PRs from release/10.0 to main * Add GitHub Actions workflow for backporting PRs --- .github/workflows/backport.yml | 17 +++++++++++++++++ github-merge-flow.jsonc | 10 ++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/backport.yml create mode 100644 github-merge-flow.jsonc diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 0000000000..60eb59ab40 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,17 @@ +name: Backport PR to branch +on: + issue_comment: + types: [created] + schedule: + # once a day at 13:00 UTC to cleanup old runs + - cron: '0 13 * * *' + +permissions: + contents: write + issues: write + pull-requests: write + actions: write + +jobs: + backport: + uses: dotnet/arcade/.github/workflows/backport-base.yml@main diff --git a/github-merge-flow.jsonc b/github-merge-flow.jsonc new file mode 100644 index 0000000000..f2558c2f99 --- /dev/null +++ b/github-merge-flow.jsonc @@ -0,0 +1,10 @@ +// IMPORTANT: This file is read by the merge flow from main branch only. +{ + "merge-flow-configurations": { + // Automate opening PRs to merge release/10.0 to main + "release/10.0":{ + "MergeToBranch": "main", + "ExtraSwitches": "-QuietComments" + } + } +} From 1772ff327ff005e47557ee469edcd3273bb13e29 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 14:58:24 +0000 Subject: [PATCH 16/32] [release/10.0] Add backport.yml and flow configuration (#2690) * Add backport.yml and flow configuration This allows to use the /backport command and to automatically open forward flow PRs from release/10.0 to main * Add GitHub Actions workflow for backporting PRs --------- Co-authored-by: Viktor Hofer --- .github/workflows/backport.yml | 17 +++++++++++++++++ github-merge-flow.jsonc | 10 ++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/backport.yml create mode 100644 github-merge-flow.jsonc diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 0000000000..60eb59ab40 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,17 @@ +name: Backport PR to branch +on: + issue_comment: + types: [created] + schedule: + # once a day at 13:00 UTC to cleanup old runs + - cron: '0 13 * * *' + +permissions: + contents: write + issues: write + pull-requests: write + actions: write + +jobs: + backport: + uses: dotnet/arcade/.github/workflows/backport-base.yml@main diff --git a/github-merge-flow.jsonc b/github-merge-flow.jsonc new file mode 100644 index 0000000000..f2558c2f99 --- /dev/null +++ b/github-merge-flow.jsonc @@ -0,0 +1,10 @@ +// IMPORTANT: This file is read by the merge flow from main branch only. +{ + "merge-flow-configurations": { + // Automate opening PRs to merge release/10.0 to main + "release/10.0":{ + "MergeToBranch": "main", + "ExtraSwitches": "-QuietComments" + } + } +} From 864756d4847fa0b50eed0fe80e5b0cfea055a26f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 29 Sep 2025 17:07:24 +0200 Subject: [PATCH 17/32] Add inter-branch merge workflow configuration (#2691) --- .github/workflows/inter-branch-merge-flow.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/inter-branch-merge-flow.yml diff --git a/.github/workflows/inter-branch-merge-flow.yml b/.github/workflows/inter-branch-merge-flow.yml new file mode 100644 index 0000000000..7cd5b0c7a5 --- /dev/null +++ b/.github/workflows/inter-branch-merge-flow.yml @@ -0,0 +1,13 @@ +name: Inter-branch merge workflow +on: + push: + branches: + - release/** + +permissions: + contents: write + pull-requests: write + +jobs: + Merge: + uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main From ef926c45d5a94cbb302c279979043111df892cc8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:29:13 +0000 Subject: [PATCH 18/32] Add inter-branch merge workflow configuration (#2692) Co-authored-by: Viktor Hofer --- .github/workflows/inter-branch-merge-flow.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/inter-branch-merge-flow.yml diff --git a/.github/workflows/inter-branch-merge-flow.yml b/.github/workflows/inter-branch-merge-flow.yml new file mode 100644 index 0000000000..7cd5b0c7a5 --- /dev/null +++ b/.github/workflows/inter-branch-merge-flow.yml @@ -0,0 +1,13 @@ +name: Inter-branch merge workflow +on: + push: + branches: + - release/** + +permissions: + contents: write + pull-requests: write + +jobs: + Merge: + uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main From 09f5b048365c9068fb4124a05b5e9356856c8e1e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 17:38:46 +0200 Subject: [PATCH 19/32] [main] Source code updates from dotnet/dotnet (#2682) * Backflow from https://github.com/dotnet/dotnet / 4a5547e build 283019 [[ commit created by automation ]] * Update dependencies from https://github.com/dotnet/dotnet build 283019 No dependency updates to commit * Backflow from https://github.com/dotnet/dotnet / 99827af build 283082 [[ commit created by automation ]] * Update dependencies from https://github.com/dotnet/dotnet build 283082 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 283253 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 283489 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 283636 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 283775 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 284039 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 284210 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 284343 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 284548 No dependency updates to commit * Update dependencies from https://github.com/dotnet/dotnet build 284884 No dependency updates to commit --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 1 - eng/Version.Details.xml | 2 +- es-metadata.yml | 8 ++++++++ ...sts.System_CommandLine_api_is_not_changed.approved.txt | 1 - src/System.CommandLine.Tests/TestActions.cs | 4 ++++ src/System.CommandLine/EnvironmentVariablesDirective.cs | 3 ++- src/System.CommandLine/Invocation/CommandLineAction.cs | 2 +- 7 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 es-metadata.yml diff --git a/eng/Version.Details.props b/eng/Version.Details.props index c4f0b4f1a0..c4909dbff2 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -1,4 +1,3 @@ - 2.0.0 - rc - 1 + rtm + diff --git a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt index f19908599f..6f542d6fe6 100644 --- a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt +++ b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt @@ -193,7 +193,6 @@ System.CommandLine.Invocation public abstract class CommandLineAction public System.Boolean ClearsParseErrors { get; } public System.Boolean Terminating { get; } - protected System.Void set_Terminating(System.Boolean value) public class ParseErrorAction : SynchronousCommandLineAction .ctor() public System.Boolean ShowHelp { get; set; } diff --git a/src/System.CommandLine.Tests/TestActions.cs b/src/System.CommandLine.Tests/TestActions.cs index eb948b3cce..ab44b12926 100644 --- a/src/System.CommandLine.Tests/TestActions.cs +++ b/src/System.CommandLine.Tests/TestActions.cs @@ -23,6 +23,8 @@ public SynchronousTestAction( public override bool ClearsParseErrors { get; } + public override bool Terminating { get; } + public override int Invoke(ParseResult parseResult) { _invoke(parseResult); @@ -46,6 +48,8 @@ public AsynchronousTestAction( public override bool ClearsParseErrors { get; } + public override bool Terminating { get; } + public override Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) { _invoke(parseResult); diff --git a/src/System.CommandLine/EnvironmentVariablesDirective.cs b/src/System.CommandLine/EnvironmentVariablesDirective.cs index ce6047614f..0d64619f76 100644 --- a/src/System.CommandLine/EnvironmentVariablesDirective.cs +++ b/src/System.CommandLine/EnvironmentVariablesDirective.cs @@ -32,9 +32,10 @@ private sealed class EnvironmentVariablesDirectiveAction : SynchronousCommandLin internal EnvironmentVariablesDirectiveAction(EnvironmentVariablesDirective directive) { _directive = directive; - Terminating = false; } + public override bool Terminating => false; + public override int Invoke(ParseResult parseResult) { SetEnvVars(parseResult); diff --git a/src/System.CommandLine/Invocation/CommandLineAction.cs b/src/System.CommandLine/Invocation/CommandLineAction.cs index 0a9cbe5ad9..5e873f08cb 100644 --- a/src/System.CommandLine/Invocation/CommandLineAction.cs +++ b/src/System.CommandLine/Invocation/CommandLineAction.cs @@ -15,7 +15,7 @@ private protected CommandLineAction() /// /// Indicates that the action terminates a command line invocation, and later actions are skipped. /// - public bool Terminating { get; protected init; } = true; + public virtual bool Terminating => true; /// /// Indicates that the action clears any parse errors associated with symbols other than one that owns the . From d97686b29b194a240e96ffc541b9df2ffc5dc53e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 18:02:34 +0200 Subject: [PATCH 21/32] Merge pull request #2667 from dotnet/darc-main-8ba81049-dffc-465c-a793-2a45180ce9bf [main] Update dependencies from dotnet/arcade --- eng/Version.Details.props | 2 +- eng/Version.Details.xml | 4 ++-- eng/common/SetupNugetSources.ps1 | 4 ++-- eng/common/SetupNugetSources.sh | 4 ++-- eng/common/core-templates/job/job.yml | 8 ++++---- eng/common/core-templates/job/onelocbuild.yml | 6 +++--- .../job/publish-build-assets.yml | 19 ++++++++++++++----- .../core-templates/job/source-build.yml | 4 ++++ .../job/source-index-stage1.yml | 2 +- .../core-templates/jobs/codeql-build.yml | 2 +- eng/common/core-templates/jobs/jobs.yml | 4 ++++ .../core-templates/jobs/source-build.yml | 5 +++++ .../core-templates/post-build/post-build.yml | 8 ++++---- .../post-build/setup-maestro-vars.yml | 2 +- .../steps/enable-internal-sources.yml | 12 ++++++------ .../core-templates/steps/generate-sbom.yml | 2 +- .../core-templates/steps/publish-logs.yml | 14 +++++++------- .../core-templates/steps/source-build.yml | 11 +++++++++-- eng/common/template-guidance.md | 2 +- eng/common/templates-official/job/job.yml | 2 +- .../variables/sdl-variables.yml | 2 +- eng/common/templates/job/job.yml | 4 ++-- global.json | 4 ++-- 23 files changed, 78 insertions(+), 49 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index c4909dbff2..18fb2045d1 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props - 9.0.0-beta.25407.2 + 9.0.0-beta.25475.3 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ba56123d89..55df1231d3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -4,9 +4,9 @@ - + https://github.com/dotnet/arcade - e29823691315ed6b3acff20d5bdf3b0be7628283 + 6404baed798af89accd98219614e6c90c153cd8c diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 5db4ad71ee..792b60b49d 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -10,8 +10,8 @@ # displayName: Setup Private Feeds Credentials # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 +# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) # diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 4604b61b03..facb415ca6 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -11,8 +11,8 @@ # - task: Bash@3 # displayName: Setup Internal Feeds # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $(Build.SourcesDirectory)/NuGet.config +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh +# arguments: $(System.DefaultWorkingDirectory)/NuGet.config # condition: ne(variables['Agent.OS'], 'Windows_NT') # - task: NuGetAuthenticate@1 # diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index 8947ea3f05..8da43d3b58 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -166,7 +166,7 @@ jobs: inputs: languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'internal') }} - richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin + richNavLogOutputDirectory: $(System.DefaultWorkingDirectory)/artifacts/bin uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} continueOnError: true @@ -189,7 +189,7 @@ jobs: inputs: testResultsFormat: 'xUnit' testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -200,7 +200,7 @@ jobs: inputs: testResultsFormat: 'VSTest' testResultsFiles: '*.trx' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -244,7 +244,7 @@ jobs: - task: CopyFiles@2 displayName: Gather buildconfiguration for build retry inputs: - SourceFolder: '$(Build.SourcesDirectory)/eng/common/BuildConfiguration' + SourceFolder: '$(System.DefaultWorkingDirectory)/eng/common/BuildConfiguration' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration' continueOnError: true diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 00feec8ebb..edefa789d3 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -8,7 +8,7 @@ parameters: CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex GithubPat: $(BotAccount-dotnet-bot-repo-PAT) - SourcesDirectory: $(Build.SourcesDirectory) + SourcesDirectory: $(System.DefaultWorkingDirectory) CreatePr: true AutoCompletePr: false ReusePr: true @@ -68,7 +68,7 @@ jobs: - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: - task: Powershell@2 inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1 arguments: $(_GenerateLocProjectArguments) displayName: Generate LocProject.json condition: ${{ parameters.condition }} @@ -115,7 +115,7 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} args: displayName: Publish LocProject.json - pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/' + pathToPublish: '$(System.DefaultWorkingDirectory)/eng/Localize/' publishLocation: Container artifactName: Loc condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 3d3356e319..a58c8a418e 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -32,6 +32,10 @@ parameters: is1ESPipeline: '' + repositoryAlias: self + + officialBuildId: '' + jobs: - job: Asset_Registry_Publish @@ -54,6 +58,11 @@ jobs: value: false # unconditional - needed for logs publishing (redactor tool version) - template: /eng/common/core-templates/post-build/common-variables.yml + - name: OfficialBuildId + ${{ if ne(parameters.officialBuildId, '') }}: + value: ${{ parameters.officialBuildId }} + ${{ else }}: + value: $(Build.BuildNumber) pool: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) @@ -72,7 +81,7 @@ jobs: - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - checkout: self + - checkout: ${{ parameters.repositoryAlias }} fetchDepth: 3 clean: true @@ -93,12 +102,12 @@ jobs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1 arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:OfficialBuildId=$(Build.BuildNumber) + /p:OfficialBuildId=$(OfficialBuildId) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} @@ -113,7 +122,7 @@ jobs: Add-Content -Path $filePath -Value "$(DefaultChannels)" Add-Content -Path $filePath -Value $(IsStableBuild) - $symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt" + $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt" if (Test-Path -Path $symbolExclusionfile) { Write-Host "SymbolExclusionFile exists" @@ -142,7 +151,7 @@ jobs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion 3 diff --git a/eng/common/core-templates/job/source-build.yml b/eng/common/core-templates/job/source-build.yml index d47f09d58f..5baedac1e0 100644 --- a/eng/common/core-templates/job/source-build.yml +++ b/eng/common/core-templates/job/source-build.yml @@ -33,6 +33,9 @@ parameters: # container and pool. platform: {} + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: '' # If set to true and running on a non-public project, @@ -93,3 +96,4 @@ jobs: parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} platform: ${{ parameters.platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml index 8b833332b3..662b9fcce1 100644 --- a/eng/common/core-templates/job/source-index-stage1.yml +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -66,7 +66,7 @@ jobs: - script: ${{ parameters.sourceIndexBuildCommand }} displayName: Build Repository - - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output + - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output displayName: Process Binlog into indexable sln - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml index f2144252cc..4571a7864d 100644 --- a/eng/common/core-templates/jobs/codeql-build.yml +++ b/eng/common/core-templates/jobs/codeql-build.yml @@ -25,7 +25,7 @@ jobs: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config - name: GuardianVersion value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml index ea69be4341..bf33cdc2cc 100644 --- a/eng/common/core-templates/jobs/jobs.yml +++ b/eng/common/core-templates/jobs/jobs.yml @@ -43,6 +43,8 @@ parameters: artifacts: {} is1ESPipeline: '' + repositoryAlias: self + officialBuildId: '' # Internal resources (telemetry, microbuild) can only be accessed from non-public projects, # and some (Microbuild) should only be applied to non-PR cases for internal builds. @@ -117,3 +119,5 @@ jobs: enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} + repositoryAlias: ${{ parameters.repositoryAlias }} + officialBuildId: ${{ parameters.officialBuildId }} diff --git a/eng/common/core-templates/jobs/source-build.yml b/eng/common/core-templates/jobs/source-build.yml index a10ccfbee6..0b408a67bd 100644 --- a/eng/common/core-templates/jobs/source-build.yml +++ b/eng/common/core-templates/jobs/source-build.yml @@ -21,6 +21,9 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: '' # If set to true and running on a non-public project, @@ -47,6 +50,7 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: @@ -55,4 +59,5 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index a8c0bd3b92..2ee8bbfff5 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -149,7 +149,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - job: @@ -206,7 +206,7 @@ stages: filePath: eng\common\sdk-task.ps1 arguments: -task SigningValidation -restore -msbuildEngine vs /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' + /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' ${{ parameters.signingValidationAdditionalParameters }} - template: /eng/common/core-templates/steps/publish-logs.yml @@ -256,7 +256,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1 arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Extract/ -GHRepoName $(Build.Repository.Name) @@ -311,7 +311,7 @@ stages: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml index f7602980db..a7abd58c4b 100644 --- a/eng/common/core-templates/post-build/setup-maestro-vars.yml +++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -36,7 +36,7 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - . $(Build.SourcesDirectory)\eng\common\tools.ps1 + . $(System.DefaultWorkingDirectory)\eng\common\tools.ps1 $darc = Get-Darc $buildInfo = & $darc get-build ` --id ${{ parameters.BARBuildId }} ` diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml index 64f881bffc..4085512b69 100644 --- a/eng/common/core-templates/steps/enable-internal-sources.yml +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -17,8 +17,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token env: Token: ${{ parameters.legacyCredential }} # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. @@ -29,8 +29,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config - ${{ else }}: - template: /eng/common/templates/steps/get-federated-access-token.yml parameters: @@ -39,8 +39,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) # This is required in certain scenarios to install the ADO credential provider. # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others # (e.g. dotnet msbuild). diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index 56a0900948..7f5b84c4cb 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -6,7 +6,7 @@ parameters: PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' PackageName: '.NET' ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom IgnoreDirectories: '' diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index 80788c5231..0623ac6e11 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -12,22 +12,22 @@ steps: inputs: targetType: inline script: | - New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ continueOnError: true condition: always() - task: PowerShell@2 displayName: Redact Logs inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/redact-logs.ps1 # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml - # Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' # If the file exists - sensitive data for redaction will be sourced from it # (single entry per line, lines starting with '# ' are considered comments and skipped) - arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs' + arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' -BinlogToolVersion ${{parameters.BinlogToolVersion}} - -TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' '$(publishing-dnceng-devdiv-code-r-build-re)' '$(MaestroAccessToken)' '$(dn-bot-all-orgs-artifact-feeds-rw)' @@ -42,7 +42,7 @@ steps: - task: CopyFiles@2 displayName: Gather post build logs inputs: - SourceFolder: '$(Build.SourcesDirectory)/PostBuildLogs' + SourceFolder: '$(System.DefaultWorkingDirectory)/PostBuildLogs' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index 37133b55b7..0718e4ba90 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -11,6 +11,10 @@ parameters: # for details. The entire object is described in the 'job' template for simplicity, even though # the usage of the properties on this object is split between the 'job' and 'steps' templates. platform: {} + + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: false steps: @@ -97,7 +101,7 @@ steps: - task: CopyFiles@2 displayName: Prepare BuildLogs staging directory inputs: - SourceFolder: '$(Build.SourcesDirectory)' + SourceFolder: '$(System.DefaultWorkingDirectory)' Contents: | **/*.log **/*.binlog @@ -126,5 +130,8 @@ steps: parameters: displayName: Component Detection (Exclude upstream cache) is1ESPipeline: ${{ parameters.is1ESPipeline }} - componentGovernanceIgnoreDirectories: '$(Build.SourcesDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + ${{ if eq(length(parameters.componentGovernanceIgnoreDirectories), 0) }}: + componentGovernanceIgnoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + ${{ else }}: + componentGovernanceIgnoreDirectories: ${{ join(',', parameters.componentGovernanceIgnoreDirectories) }} disableComponentGovernance: ${{ eq(variables['System.TeamProject'], 'public') }} diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 98bbc1ded0..4bf4cf41bd 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -50,7 +50,7 @@ extends: - task: CopyFiles@2 displayName: Gather build output inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel' + SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel' ``` diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 817555505a..81ea7a261f 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -3,7 +3,7 @@ parameters: enableSbom: true runAsPublic: false PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml index dbdd66d4a4..f1311bbb1b 100644 --- a/eng/common/templates-official/variables/sdl-variables.yml +++ b/eng/common/templates-official/variables/sdl-variables.yml @@ -4,4 +4,4 @@ variables: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index d1aeb92fce..5bdd3dd85f 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -6,7 +6,7 @@ parameters: enableSbom: true runAsPublic: false PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml @@ -75,7 +75,7 @@ jobs: parameters: is1ESPipeline: false args: - targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration' + targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration' artifactName: 'BuildConfiguration' displayName: 'Publish build retry configuration' continueOnError: true diff --git a/global.json b/global.json index 27e056db5d..1be129994f 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "9.0.109", + "dotnet": "9.0.110", "runtimes": { "dotnet": [ "8.0.12" @@ -8,6 +8,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25407.2" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25475.3" } } From b0168c554276ef7642da40d92a0f8b2cb5adbdc1 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 29 Sep 2025 09:38:58 -0700 Subject: [PATCH 22/32] Do not sign dotnet-suggest when not building from the VMR (#2677) --- eng/Signing.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/Signing.props b/eng/Signing.props index f6fb6b798a..234aee04b8 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -1,7 +1,8 @@ - + + From 5b5ad834a1a2994d688a1a7edf1669a17b1b3469 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 16:42:43 +0000 Subject: [PATCH 23/32] Do not sign dotnet-suggest when not building from the VMR (#2694) Co-authored-by: Matt Mitchell --- eng/Signing.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/Signing.props b/eng/Signing.props index f6fb6b798a..234aee04b8 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -1,7 +1,8 @@ - + + From 897865953ca70c0c20520e5486e626adf7c8d35f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 30 Sep 2025 15:20:38 +0200 Subject: [PATCH 24/32] Update Versions.props --- eng/Versions.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 8007672b39..ccb2158f7e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,10 +1,10 @@ - + - 2.0.0 - rtm - + 3.0.0 + alpha + 1 From 4fd06b8400d463ed525d5d6deca9756ee98cf314 Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Thu, 9 Oct 2025 16:46:38 -0400 Subject: [PATCH 25/32] Update Argument.HelpName and SymbolResult.GetResult API docs (#2701) --- src/System.CommandLine/Argument.cs | 15 ++++++++++++++- src/System.CommandLine/Parsing/SymbolResult.cs | 9 ++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/System.CommandLine/Argument.cs b/src/System.CommandLine/Argument.cs index 1640e883df..f1c915045e 100644 --- a/src/System.CommandLine/Argument.cs +++ b/src/System.CommandLine/Argument.cs @@ -45,8 +45,21 @@ public ArgumentArity Arity } /// - /// The name used in help output to describe the argument. + /// Gets or sets the placeholder name shown in usage help for the argument's value. + /// The value will be wrapped in angle brackets (< and >). /// + /// + /// If null, the of the argument will be used. + /// + /// + /// An argument with of argument and a + /// of Value will be shown in usage help as: + /// <Value>. If is not set, + /// help output will show: <argument>. + /// + /// + /// The name to show as the placeholder for the argument's value. + /// public string? HelpName { get; set; } internal TryConvertArgument? ConvertArguments diff --git a/src/System.CommandLine/Parsing/SymbolResult.cs b/src/System.CommandLine/Parsing/SymbolResult.cs index 0016375754..18df4af83e 100644 --- a/src/System.CommandLine/Parsing/SymbolResult.cs +++ b/src/System.CommandLine/Parsing/SymbolResult.cs @@ -91,10 +91,13 @@ public IEnumerable Errors public DirectiveResult? GetResult(Directive directive) => SymbolResultTree.GetResult(directive); /// - /// Finds a result for a symbol having the specified name anywhere in the parse tree. + /// Finds a result for a having the specified anywhere in the parse tree. /// - /// The name of the symbol for which to find a result. - /// An argument result if the argument was matched by the parser or has a default value; otherwise, null. + /// The name of the for which to find a result. + /// + /// A if the was matched by the parser or has a default value; + /// otherwise, . + /// public SymbolResult? GetResult(string name) => SymbolResultTree.GetResult(name); From 7a5ab9e32c4a8a66b925b9380408a6847e3fd098 Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Thu, 9 Oct 2025 13:55:40 -0700 Subject: [PATCH 26/32] a couple of minor XML doc fixes (#2702) --- src/System.CommandLine/Completions/CompletionContext.cs | 4 ++++ src/System.CommandLine/OptionValidation.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/System.CommandLine/Completions/CompletionContext.cs b/src/System.CommandLine/Completions/CompletionContext.cs index ebde81a6e1..e18994c48e 100644 --- a/src/System.CommandLine/Completions/CompletionContext.cs +++ b/src/System.CommandLine/Completions/CompletionContext.cs @@ -23,10 +23,14 @@ internal CompletionContext(ParseResult parseResult, string wordToComplete) WordToComplete = wordToComplete; } + /// /// The text of the word to be completed, if any. + /// public string WordToComplete { get; } + /// /// The parse result for which completions are being requested. + /// public ParseResult ParseResult { get; } /// diff --git a/src/System.CommandLine/OptionValidation.cs b/src/System.CommandLine/OptionValidation.cs index 02ed98f35e..d2f97023b4 100644 --- a/src/System.CommandLine/OptionValidation.cs +++ b/src/System.CommandLine/OptionValidation.cs @@ -46,7 +46,7 @@ public static Option AcceptExistingOnly(this Option - /// Configures an option to accept only values corresponding to a existing files or directories. + /// Configures an option to accept only values corresponding to existing files or directories. /// /// The option to configure. /// The option being extended. From 4558ababe8486ad108aea3bcdf0c2a53d24b4140 Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Thu, 30 Oct 2025 08:19:17 -0700 Subject: [PATCH 27/32] Upgrade dotnet tools version to 9.0.111 (#2713) --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 1be129994f..cc063e4c49 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "9.0.110", + "dotnet": "9.0.111", "runtimes": { "dotnet": [ "8.0.12" From bde5be7716dbdd182a498650123363007a63bc5b Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 30 Oct 2025 21:39:31 -0700 Subject: [PATCH 28/32] Update global.json to include SDK settings (#2714) The `tools` section is proprietary and only used by arcade. The `sdk` section is used by dotnet to ensure this SDK version is used, and also what the publicly available AzDo build tasks use when installing dotnet. --- global.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/global.json b/global.json index cc063e4c49..c6a06a5316 100644 --- a/global.json +++ b/global.json @@ -1,4 +1,9 @@ { + "sdk": { + "version": "9.0.111", + "allowPrerelease": true, + "rollForward": "major" + }, "tools": { "dotnet": "9.0.111", "runtimes": { From 26a231ceed269cc58e4360cd8c3fda2f1c2d8414 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 10:29:43 -0800 Subject: [PATCH 29/32] [main] Update dependencies from dotnet/arcade (#2700) * Update dependencies from https://github.com/dotnet/arcade build 20251003.3 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25475.3 -> To Version 9.0.0-beta.25503.3 * Update dependencies from https://github.com/dotnet/arcade build 20251015.2 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25475.3 -> To Version 9.0.0-beta.25515.2 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 2 +- eng/Version.Details.xml | 4 ++-- eng/common/post-build/nuget-verification.ps1 | 2 +- global.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 18fb2045d1..181a6c0f33 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props - 9.0.0-beta.25475.3 + 9.0.0-beta.25515.2 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 55df1231d3..9d2a642c03 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -4,9 +4,9 @@ - + https://github.com/dotnet/arcade - 6404baed798af89accd98219614e6c90c153cd8c + 6666973b629b24e259162dba03486c23af464bab diff --git a/eng/common/post-build/nuget-verification.ps1 b/eng/common/post-build/nuget-verification.ps1 index a365194a93..ac5c69ffca 100644 --- a/eng/common/post-build/nuget-verification.ps1 +++ b/eng/common/post-build/nuget-verification.ps1 @@ -30,7 +30,7 @@ [CmdletBinding(PositionalBinding = $false)] param( [string]$NuGetExePath, - [string]$PackageSource = "https://api.nuget.org/v3/index.json", + [string]$PackageSource = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json", [string]$DownloadPath, [Parameter(ValueFromRemainingArguments = $true)] [string[]]$args diff --git a/global.json b/global.json index c6a06a5316..58a1abc3cd 100644 --- a/global.json +++ b/global.json @@ -13,6 +13,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25475.3" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25515.2" } } From 7b945650604c228ade34ef1e12c489ac3688df4b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:52:24 +0100 Subject: [PATCH 30/32] Update dependencies from https://github.com/dotnet/arcade build 20251105.4 (#2720) On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25515.2 -> To Version 9.0.0-beta.25555.4 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 2 +- eng/Version.Details.xml | 4 ++-- eng/common/core-templates/job/publish-build-assets.yml | 5 +++++ eng/common/core-templates/post-build/post-build.yml | 5 +++++ eng/common/cross/x64/tizen/tizen.patch | 9 +++++++++ global.json | 2 +- 6 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 eng/common/cross/x64/tizen/tizen.patch diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 181a6c0f33..430625c174 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props - 9.0.0-beta.25515.2 + 9.0.0-beta.25555.4 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9d2a642c03..5b182978a2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -4,9 +4,9 @@ - + https://github.com/dotnet/arcade - 6666973b629b24e259162dba03486c23af464bab + 9eaf7b289d5003a94ee23658f057a6c06ddcd570 diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index a58c8a418e..6b5ff28cc7 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -145,6 +145,11 @@ jobs: PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} is1ESPipeline: ${{ parameters.is1ESPipeline }} + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index 2ee8bbfff5..221d1ac6de 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -305,6 +305,11 @@ stages: - task: NuGetAuthenticate@1 + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: diff --git a/eng/common/cross/x64/tizen/tizen.patch b/eng/common/cross/x64/tizen/tizen.patch new file mode 100644 index 0000000000..56fbc88109 --- /dev/null +++ b/eng/common/cross/x64/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib64/libc.so b/usr/lib64/libc.so +--- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf64-x86-64) +-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-x86-64.so.2 ) ) diff --git a/global.json b/global.json index 58a1abc3cd..fab7444963 100644 --- a/global.json +++ b/global.json @@ -13,6 +13,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25515.2" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25555.4" } } From 35ab6f07da15e5d0d4b6bb7d5962aedb3151d980 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:05:48 +0000 Subject: [PATCH 31/32] Update dependencies from https://github.com/dotnet/dotnet build 289869 (#2717) No dependency updates to commit Co-authored-by: dotnet-maestro[bot] Co-authored-by: Viktor Hofer --- eng/Version.Details.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5b182978a2..676627d3f5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,6 +1,6 @@ - + From c75b0413e7ce26637d9b3e3cf0ac0641e09e1a46 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 10 Nov 2025 17:01:08 +0100 Subject: [PATCH 32/32] Remove llvm-toolchain-focal-9 dependency (#2721) --- .vsts-ci-official.yml | 4 ---- .vsts-ci.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.vsts-ci-official.yml b/.vsts-ci-official.yml index 387b7f9182..1e77b37b4e 100644 --- a/.vsts-ci-official.yml +++ b/.vsts-ci-official.yml @@ -149,10 +149,6 @@ extends: steps: - checkout: self clean: true - - bash: | - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo apt-add-repository "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-9 main" - sudo apt-get update - bash: | sudo apt-get install cmake clang-9 libicu66 uuid-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev - script: eng/common/cibuild.sh diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 26061cae6e..52961143bf 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -93,10 +93,6 @@ stages: steps: - checkout: self clean: true - - bash: | - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo apt-add-repository "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-9 main" - sudo apt-get update - bash: | sudo apt-get install cmake clang-9 libicu66 uuid-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev - script: eng/common/cibuild.sh