snippet-project-files
Add or consolidate .NET snippet project files so every snippet directory builds as one project.
Source facts
- Repository
- dotnet/dotnet-api-docs
- Last source activity
- August 11, 2026 at 16:41
- Detected SKILL.md language
- English
- Stars
- 954
- Forks
- 1,702
Install options
The review-first prompt is selected by default. You can switch to a direct command or download a local copy.
Review the source files
Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.
Showing SKILL.md
SKILL.md
Source instructions · Read-only preview- 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.
View on GitHub