snippet-project-files
Add or consolidate .NET snippet project files so every snippet directory builds as one project.
来源信息
- 仓库
- dotnet/dotnet-api-docs
- 最近来源活动
- 2026年8月11日 16:41
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 954
- 分支
- 1,702
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- snippet-project-files
- description
- Add or consolidate .NET snippet project files so every snippet directory builds as one project.
# Snippet project files
When adding or fixing project files under `snippets/`:
1. Keep exactly one project file in each directory.
2. Use SDK-style projects and the default compile includes. Don't add explicit `<Compile Include="...">` items.
3. Set `OutputType` to `Exe` when the directory contains an entry point or top-level statements. Otherwise, use `Library`.
4. If multiple source files define `Main`, rename each method to `Run`.
5. Give duplicate types in the same directory unique names.
6. Add one `Program.cs` file that calls every `Run` method, passing `args` to methods that accept command-line arguments.
7. Build the consolidated project and fix all compile errors.
在 GitHub 查看