Skip to content

Development Setup

ToolVersionCheck
.NET SDK10.0.xdotnet --version
Git2.40+ with SSH accessgit --version
Node.js22+ (for markdownlint)node --version
Docker24+ (for integration tests)docker --version
  • 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
Terminal window
git clone git@github.com:granit-fx/granit-dotnet.git
cd granit-dotnet
# Build the entire solution
dotnet build
# Run all tests
dotnet test
# Run tests for a specific package
dotnet test tests/Granit.Security.Tests
# Verify code formatting
dotnet format --verify-no-changes
# Validate markdown files
npx markdownlint-cli2 "docs/**/*.md"
Terminal window
# Pack all packages locally
dotnet pack -c Release -o ./nupkgs

All package versions are managed centrally in Directory.Packages.props (Central Package Management).

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 file

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

The documentation site uses Astro Starlight. To run it locally:

Terminal window
cd docs-site
pnpm install
pnpm dev