.NET 11 example for sln filters editing is misleading

已关闭 适合新手
#56,551 0 条评论 1 个 reaction 已指派 2 人 在 GitHub 查看

维护者通常 1 天内回复

@BillWagner 已经在做这个了。

开始于 2026年10月26日。

  • #56608 来自 @copilot-swe-agent —— 已合并

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
82/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
领域
documentation

调研方向

Issue 链接到 docs/core/whats-new/dotnet-11/sdk.md 第 110–115 行。阅读该部分并检查 dotnet new slnf 的选项,然后更新示例,在 --name 中省略 .slnf 并包含 --parent-solution。当示例使用修正后的名称并显示父 solution 选项时,即为完成。

由索引模型根据 Issue 内容生成。

描述

Describe the issue or suggestion

In the article for what's new for the .NET SDK in .NET 11 there is a section about the new soultion filter file creation command and how you can also edit the file with the dotnet sln command.

https://github.com/dotnet/docs/blob/5e19883f3aca93e649d9e3fb72b0b89091d7079f/docs/core/whats-new/dotnet-11/sdk.md?plain=1#L110-L115

I think this example could be better.

First, it uses the --name option which you would likely also do, but in the sample they type in MyApp.slnf as the value, but that would create a new solution filter file called MyApp.slnf.slnf which is probably not what we want. So the actual value for that option in the sample should be without the .slnf suffix.

Secondly, I think that most would use the dotnet new slnf command with the -s, --parent-solution <parent-solution> option as the default is almost never what you would use, so I think it would make sense to use that in the example.

So a better sample in my opinion would be something like:

```bash
dotnet new slnf --parent-solution MySolution.slnx --name Tests
dotnet sln Tests.slnf add tests/Tests/Tests.csproj
dotnet sln Tests.slnf add src/Lib/Lib.csproj
dotnet sln Tests.slnf list
dotnet sln Tests.slnf remove src/Lib/Lib.csproj
```
主要语言
没有语言数据
星标
4.8k
派生
6.1k
平均合并
1 天 5 小时
30 天内合并 PR
213

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotnet/docs 的其他 Issue

查看 dotnet/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。