Developer and AI-agent quick-reference for building, testing, and CI checks.
- .NET 9 SDK — required; pinned in
global.json - A SQL Server instance with the AdventureWorks2012 database attached (used by all runtime tests)
- Local tools are declared in
.config/dotnet-tools.json; restore once per clone:
dotnet tool restore
This installs Paket 10 and Fantomas 7.
Paket manages all NuGet dependencies. After dotnet tool restore, run:
dotnet paket install # re-resolves + updates paket.lock (after editing paket.dependencies)
dotnet paket restore # fast restore from existing paket.lock (normal dev workflow)The paket.lock is committed and should be kept up-to-date. Do not edit packages/ by hand.
# Build the main library + design-time assembly
dotnet build SqlClient.sln -c Release
# Build the console sample (requires the library to be built first)
dotnet build Samples.sln -c Release
# Build the test projects
dotnet build Tests.sln -c ReleaseThe FAKE-based build script in build/ orchestrates everything in order:
cd build
dotnet run # runs all: Clean → CheckFormat → AssemblyInfo → Build → …
dotnet run -- Build # run a single targetAll F# source in src/, tests/, and build/ is formatted with Fantomas.
# Format in-place
dotnet fantomas src tests build
# Check only (what CI does — fails if any file needs reformatting)
dotnet fantomas src tests build --checkCI will fail if any file is not formatted. Always run the formatter before committing.
Formatting configuration is in .fantomasrc; editor settings in .editorconfig.
Tests require a live SQL Server with AdventureWorks2012. The connection string is read from tests/SqlClient.Tests/app.config (key AdventureWorks) or the environment variable GITHUB_ACTION_SQL_SERVER_CONNECTION_STRING.
dotnet test tests/SqlClient.Tests/SqlClient.Tests.fsproj -f net9.0
dotnet test tests/SqlClient.DesignTime.Tests/SqlClient.DesignTime.Tests.fsproj -f net9.0Before opening a PR, ensure:
dotnet paket restoresucceeds (paket.lock is committed and up-to-date).dotnet build SqlClient.sln -c Release— no errors (FS0044 deprecation warnings forSystem.Data.SqlClientare expected and suppressed).dotnet fantomas src tests build --recurse --check— exits 0 (no unformatted files).- Tests pass against a SQL Server instance with AdventureWorks2012.
| Path | Purpose |
|---|---|
src/SqlClient/ |
Runtime library (FSharp.Data.SqlClient.dll), targets netstandard2.0;net9.0 |
src/SqlClient.DesignTime/ |
Design-time assembly, targets net9.0 |
src/SqlClient.Samples/ConsoleSample/ |
Runnable demo of SqlCommandProvider, SqlProgrammabilityProvider, SqlEnumProvider |
src/SqlClient.TestProjects/ |
Integration test helpers (Lib, NetCoreApp) |
tests/SqlClient.Tests/ |
Main test suite, net9.0 |
tests/SqlClient.DesignTime.Tests/ |
Design-time-specific tests, net9.0 |
build/ |
FAKE + Fun.Build pipeline (dotnet run) |
paket.dependencies |
Top-level package declarations (no .NET Framework groups) |
.config/dotnet-tools.json |
Local tool manifest (paket, fantomas) |
- No .NET Framework / Mono support. All target frameworks are
net9.0ornetstandard2.0. Do not addnet462,net471, or similar TFMs. - Paket manages packages. Do not use
dotnet add package. Editpaket.dependenciesand rundotnet paket installinstead. System.Data.SqlClient(legacy) is used intentionally. Migration toMicrosoft.Data.SqlClientis a future task; FS0044 warnings are suppressed.- The design-time assembly output path is
bin/typeproviders/fsharp41/net9.0/— this is the standard layout expected by the F# type-provider SDK.