This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Paket is a dependency manager for .NET with support for NuGet packages and git repositories. It maintains transitive dependency information in paket.lock alongside paket.dependencies, providing explicit control over dependency resolution that NuGet traditionally lacked.
# Full build (restores, builds, runs tests)
build.cmd # Windows
./build.sh # Linux/Mac
# Build with specific targets
build.cmd Build # Build only
build.cmd QuickTest # Run unit tests without full build
build.cmd RunTests # Run all unit tests
build.cmd QuickIntegrationTests # Run quick integration tests (scriptgen category)
build.cmd RunIntegrationTestsNet # Run full .NET Framework integration tests
build.cmd RunIntegrationTestsNetCore # Run full .NET Core integration tests
# Skip specific stages
build.cmd SkipTests # Skip all tests
build.cmd SkipIntegrationTests # Skip integration tests onlyUnit Tests:
dotnet test tests/Paket.Tests/Paket.Tests.fsproj
dotnet test tests/Paket.Tests/Paket.Tests.fsproj --filter "FullyQualifiedName~SemVerSpecs"Integration Tests:
dotnet test integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj
dotnet test integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj --filter "TestCategory=scriptgen"Tests use NUnit. Integration tests have scenario folders under integrationtests/scenarios/ with before/ directories containing test fixtures.
- src/Paket.Core/ - Core library with all dependency management logic (F#)
- src/Paket/ - CLI executable (F#, references Paket.Core)
- src/Paket.Bootstrapper/ - Downloads paket.exe on first run (C#)
- src/FSharp.DependencyManager.Paket/ - F# Interactive integration (
#r "paket:"support)
The core library is organized into these logical layers (see Paket.Core.fsproj for exact file order):
- Common/ - Shared utilities (logging, async helpers, XML, networking, encryption)
- Versioning/ - SemVer parsing, version ranges, framework handling, platform matching, package sources
- Dependencies/ - NuGet protocol (V2/V3), Git handling, package resolution algorithm, dependency parsing
- PaketConfigFiles/ - File format parsers/writers for paket.dependencies, paket.lock, paket.references, .fsproj/.csproj
- Installation/ - Restore, install, update processes; binding redirects; script generation
- PackageAnalysis/ - Outdated detection, find-refs, simplifier,
paket whyfunctionality - PackageManagement/ - Add/remove packages, NuGet conversion
- Packaging/ -
paket packfor creating NuGet packages
DependenciesFile- Represents paket.dependenciesLockFile- Represents paket.lockReferencesFile- Represents paket.referencesProjectFile- Represents .fsproj/.csproj with Paket modificationsSemVerInfo- Semantic version parsingFrameworkIdentifier- Target framework handlingPackageResolver- The dependency resolution algorithm
PublicAPI.fs exposes the Dependencies class for programmatic access, used by F# Interactive and external tooling.
Commands are defined in src/Paket/Commands.fs using Argu. Each command has corresponding args types (e.g., AddArgs, RestoreArgs). Command documentation is auto-generated from these definitions.
- Paket.Core:
net461andnetstandard2.0 - Paket CLI:
net461andnet9 - Tests:
net461andnet9(some tests may be framework-specific via#ifdirectives)
Key symbols used:
DOTNETCORE/NETSTANDARD1_5/NETSTANDARD1_6- .NET Core buildsNO_BOOTSTRAPPER- Exclude bootstrapper code pathsUSE_WEB_CLIENT_FOR_UPLOAD- Use WebClient on .NET Framework for uploads
Each scenario in integrationtests/scenarios/ typically has:
before/- Initial state with paket.dependencies, paket.lock, project files- Tests copy
before/totemp/, run Paket commands, verify results - Scenario names often reference GitHub issue numbers (e.g.,
i001234-description)
The build script reads RELEASE_NOTES.md for version info. Release builds use ILRepack to merge assemblies into a single paket.exe. The merged executable goes to bin/merged/.