/dotnet-cursor-rules

.mdc files for defining Cursor rules specific to .NET projects

Apache License 2.0Apache-2.0

๐ŸŽฏ .NET Cursor Rules

A collection of Cursor AI rules for .NET development best practices.

How to Use This Repository

Copy the relevant rules you want to use into your project's .cursor/rules directory OR add them as global rules in the Cursor IDE.

๐Ÿ“š Available Rule Sets

Rules for publishing high-quality NuGet packages:

  • ๐Ÿ“„ License configuration best practices
  • ๐Ÿ“š Package documentation requirements
  • ๐Ÿท๏ธ Metadata organization guidelines
  • ๐Ÿ” Source debugging and symbol package setup
  • ๐Ÿ”— Dependency management recommendations
  • ๐Ÿ”ข Versioning conventions
  • ๐Ÿš€ Build and pack commands

๐Ÿ› ๏ธ .NET Tool Management

Rules for working with .NET CLI tools:

  • ๐Ÿ“ฆ Publishing tools as NuGet packages
  • ๐Ÿ”ง Consuming tools in projects
  • ๐Ÿ”„ Managing tool versions and updates
  • โœจ Best practices for tool development

๐Ÿ”„ CI/CD

Rules for build and deployment processes:

  • ๐Ÿ—๏ธ Build system configuration and best practices
  • ๐Ÿ“ Release management and versioning
  • ๐Ÿ” Code signing and security
  • ๐Ÿš€ Pipeline configuration (GitHub Actions & Azure DevOps)
  • ๐Ÿ“ฆ Package publishing

๐ŸŽ›๏ธ .NET SDK Management

Rules for managing .NET solutions and dependencies:

  • ๐ŸŽฏ SDK version control and configuration
  • ๐Ÿ—๏ธ Solution-wide build properties
  • ๐Ÿ“ฆ NuGet package management
  • ๐Ÿ”’ Security and license compliance
  • ๐Ÿš€ Build and dependency automation

๐Ÿ’ป C# Development

Rules for writing clean, maintainable C# code:

  • โœจ Modern C# coding patterns
  • ๐Ÿงช Testing best practices
  • ๐Ÿ“ Code organization
  • ๐Ÿ›ก๏ธ Error handling
  • ๐Ÿ”Œ Dependency management

โšก Benchmarking

Rules for performance testing and benchmarking:

  • ๐Ÿ“Š BenchmarkDotNet usage
  • ๐Ÿงฎ Memory and allocation analysis
  • ๐Ÿ“ˆ Performance regression testing
  • ๐Ÿ’ช Hardware optimizations
  • ๐Ÿ”„ CI/CD integration

๐Ÿš€ Usage

These rules are designed to be used with Cursor, providing AI-powered guidance for .NET development. Each rule set contains:

  • ๐Ÿ“– Detailed best practices
  • ๐Ÿ› ๏ธ Example configurations
  • ๐Ÿ”’ Security considerations
  • ๐Ÿ”ง Maintenance guidelines

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

Copyright 2010-2025 Aaron Stannard Licensed under the Apache 2.0 license.