Development Setup
Prerequisites
Section titled “Prerequisites”| Tool | Version | Check |
|---|---|---|
| .NET SDK | 10.0.x | dotnet --version |
| Git | 2.40+ with SSH access | git --version |
| Node.js | 22+ (for markdownlint) | node --version |
| Docker | 24+ (for integration tests) | docker --version |
Recommended IDEs
Section titled “Recommended IDEs”- JetBrains Rider (recommended) — full support for Roslyn analyzers,
.editorconfig, and solution-wide analysis - Visual Studio 2022 (17.14+) — ensure the .NET 10 workload is installed
- VS Code — with the C# Dev Kit extension
Clone and build
Section titled “Clone and build”git clone git@github.com:granit-fx/granit-dotnet.gitcd granit-dotnet
# Build the entire solutiondotnet build
# Run all testsdotnet test
# Run tests for a specific packagedotnet test tests/Granit.Security.Tests
# Verify code formattingdotnet format --verify-no-changes
# Validate markdown filesnpx markdownlint-cli2 "docs/**/*.md"NuGet packaging
Section titled “NuGet packaging”# Pack all packages locallydotnet pack -c Release -o ./nupkgsAll package versions are managed centrally in Directory.Packages.props (Central Package Management).
Project structure overview
Section titled “Project structure overview”granit-dotnet/├── src/ Source packages (one project = one NuGet package)│ ├── Granit.Core/│ ├── Granit.Timing/│ ├── Granit.Vault/│ └── ...├── tests/ Test projects (mirror of src/)│ ├── Granit.Core.Tests/│ ├── Granit.Timing.Tests/│ ├── Granit.ArchitectureTests/│ └── ...├── docs-site/ Starlight documentation site├── Directory.Build.props Shared build properties (nullable, warnings-as-errors)├── Directory.Packages.props Central Package Management├── BannedSymbols.txt Banned API list (enforced at compile time)└── Granit.sln Solution fileBuild properties
Section titled “Build properties”The following settings are enforced globally via Directory.Build.props:
- Nullable reference types: enabled (
<Nullable>enable</Nullable>) - Warnings as errors: enabled — the project must compile with zero warnings
- Target framework:
net10.0 - Language version: C# 14
- ImplicitUsings: enabled
Docs site
Section titled “Docs site”The documentation site uses Astro Starlight. To run it locally:
cd docs-sitepnpm installpnpm devNext steps
Section titled “Next steps”- Read the Coding Standards before writing code
- Check the Module Structure if you are creating a new package
- Review the Definition of Done before pushing