Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Proposal: UseSystemCommandLine extension for IHostBuilder

オープン
#2,688 コメント 1 件 リアクション 8 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
cli

調査の方向性

この提案は、Host.CreateDefaultBuilder(args)、提案されている UseSystemCommandLine 拡張、ParseResult、および DI を中心としています。まず、これらの API が現在リポジトリ内でどのように連携しているかを追跡します。完了とするには、合意された加法的な設計と、パース、--help、検証、およびオプションのパース後構成に対するカバレッジが必要です。

索引モデルが issue の本文から書いたものです。

説明

Hi team,

while building .NET apps (console, WPF, Windows-Service) on top of System.CommandLine, I often combine it with Microsoft.Extensions.Hosting.
Today each app must:
• parse args manually,
• inject ParseResult into DI,
• handle --help / validation,
• wire optional post-parse configuration.

I propose a small host extension:

Host.CreateDefaultBuilder(args)
    .UseSystemCommandLine(rootCommand, args, (parseResult, services) =>
    {
        // optional post-parse configuration
    });

Benefits:
• Unified startup for console, WPF and service apps
• Single parse before building the host
• DI-friendly access to ParseResult or a typed accessor

This would live as an additive helper, so no breaking change.

Would you consider such an addition?
I’m happy to draft a PR if the idea fits the roadmap.

Thanks!

主要言語
C#
スター
3.7k
フォーク
434
平均マージ
4時間 46分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/command-line-api のほかの issue

dotnet/command-line-api の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。