This guide explains how to build, test, and format the PolylineAlgorithm codebase locally.
- .NET 10 SDK (or newer)
- A terminal / shell
Build the main library using the solution file:
dotnet build PolylineAlgorithm.slnxTo build in Release configuration (required before running tests or benchmarks):
dotnet build PolylineAlgorithm.slnx --configuration ReleaseRun all unit tests:
dotnet test ./tests/PolylineAlgorithm.Tests/PolylineAlgorithm.Tests.csproj --configuration ReleaseNote: Always use Release configuration when running tests. The Debug configuration contains a
Debug.AssertinAbstractPolylineEncoderTestthat will crash the test runner.
To collect code coverage at the same time:
dotnet test ./tests/PolylineAlgorithm.Tests/PolylineAlgorithm.Tests.csproj \
--configuration Release \
--coverage \
--coverage-output-format cobertura \
--coverage-settings ./code-coverage-settings.xmlSee Benchmarks for full details. Quick run:
dotnet run --project ./benchmarks/PolylineAlgorithm.Benchmarks/PolylineAlgorithm.Benchmarks.csproj \
--configuration Release \
--framework net10.0 \
-- --filter '*'The project uses dotnet format for code style enforcement. Run all format steps before committing:
# Fix whitespace
dotnet format whitespace
# Fix code style
dotnet format style
# Fix analyzer warnings (optional — run when you want to fix diagnostics)
dotnet format analyzersThe CI format job also runs dotnet format automatically on every push to non-release branches and pushes the formatted result back to the branch.
Code style rules are stored in .editorconfig at the repository root. Any compliant IDE (Visual Studio, VS Code with C# Dev Kit, Rider) will pick these up automatically.