Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/aaronontheweb/dotnet-cursor-rules/dotnet-buildgit clone --depth 1 https://github.com/Aaronontheweb/dotnet-cursor-rulesWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.05571 |
| Opus 5 | $0.00000 | $0.02786 |
| Sonnet 5 | $0.00000 | $0.01114 |
| Haiku 4.5 | $0.00000 | $0.00557 |
Grade A, and why
dotnet-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 867 lines — stays where its author put it; the contents beside it link to each section on GitHub.
.NET Build System Rules and Best Practices
Core Build Philosophy
✅ DO
- Use native
dotnetCLI commands as the primary build mechanism - Keep build scripts simple, maintainable, and cross-platform compatible
- Use PowerShell for custom build tasks that can't be handled by
dotnetCLI - Maintain clear separation between build, test, and release processes
- Document all build prerequisites and requirements
❌ DON'T
- Use complex build systems like CAKE, FAKE, or NUKE
- Mix build and deployment logic in the same scripts
- Hardcode environment-specific paths or settings
- Implement complex logic in YAML pipelines (use PowerShell scripts instead)
- Duplicate build logic across different files
Project Structure
[!IMPORTANT] Don't create new files without first checking existing ones. Build system files should follow a consistent, predictable structure.
Required Files and Their Purposes
├── Directory.Build.props # Central version and package metadata
├── Directory.Packages.props # Centralized package version management
├── global.json # SDK version pinning
├── RELEASE_NOTES.md # Version history and release notes
├── build.ps1 # Version management script (minimal)
├── scripts/ # PowerShell helper scripts
│ ├── getReleaseNotes.ps1 # Parse release notes
│ ├── bumpVersion.ps1 # Update assembly versions
│ ├── integration-tests.ps1 # Integration test runner
│ └── *.ps1 # Other build helper scripts
├── build-system/ # CI/CD pipeline definitions
│ ├── azure-pipeline.template.yaml # Shared pipeline template
│ ├── windows-pr-validation.yaml # Windows PR validation
│ ├── linux-pr-validation.yaml # Linux PR validation
│ └── windows-release.yaml # Release pipeline
└── .github/workflows/ # GitHub Actions (if used)
├── pr-validation.yaml # PR validation
└── release.yaml # Release workflow
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 867 lines · 5,571 tokens per session scan A 73019e4d7f67
dotnet-build is a cursor rule published in the GitHub repository Aaronontheweb/dotnet-cursor-rules (134 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,571 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
csharp
C# patterns: async/await, nullable refs, LINQ.
aspnet-abp-cursorrules-prompt-file
Cursor rules for Aspnet Abp.
csharp
Rules applied when working in C# / .NET files.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.