一个用于列出和运行示例的 dotnet 工具
A dotnet tool to list and run examples similar to Rust's cargo run --example.
> dotnet tool install -g dotnet-example> dotnet example
╭─────────────┬──────────────────────────────────────────────╮
│ Example │ Description │
├─────────────┼──────────────────────────────────────────────┤
│ CSharp │ Writes 'Hello from C#' to the console │
│ FSharp │ Writes 'Hello from F#' to the console │
╰─────────────┴──────────────────────────────────────────────╯
Type dotnet example --help for help> dotnet example csharp
Hello from C#
> dotnet example fsharp
Hello from F#> dotnet example --all
── Example: CSharp ────────────────────────────────────────────────
Hello from C#
── Example: FSharp ────────────────────────────────────────────────
Hello from F#…The convention is simple, if there is an examples or samples folder
in the directory the tool is executed in, it will fetch all csproj/fsproj files
and find the best match to the query.
If examples are located in unconventional folders, add a .examples file
with the (relative) paths of the examples folders, one per line. Blank lines
or lines starting with # in the .examples file are ignored.
To change the name, description, and the order of an example, edit its csproj/fsproj file, and add the following section:
Foo
This is the description of the example.
5
If no name is set in the csproj file, the project name will be used.
To ignore an example, add the ExampleVisible property in the example's csproj/fsproj file.
false
暂无开放 Issues,或尚未同步最近议题。