Skip to main content
Set up a C# project for Speckle automation: install NuGet packages, register the SDK once at startup, and optionally add Speckle.Objects when you work with geometry types. When to read this: before your first compile against Speckle.Sdk. Read next: Build your first model analysis tool, then Automate with scripts for the canonical bootstrap snippet.

Requirements

Speckle.Sdk targets three frameworks, so it runs in both modern and legacy host apps:
Target frameworkTypical use case
net10.0New standalone .NET applications and services
net8.0Current-generation .NET applications and services
netstandard2.0Older host apps, such as Revit on .NET Framework 4.8
Speckle.Sdk works on Windows, macOS, and Linux.

Install with the .NET CLI

dotnet add package Speckle.Sdk
Or add the package reference directly to your .csproj:
<ItemGroup>
  <PackageReference Include="Speckle.Sdk" Version="3.*" />
</ItemGroup>

Install a specific version

dotnet add package Speckle.Sdk --version 3.21.1
Check NuGet for the latest published version before pinning — the version above is a point-in-time example, not a recommendation to stay on it.
Speckle.Sdk’s public API may not be wholly stable between releases. Pin an explicit version rather than using a floating range in production projects, and review release notes before upgrading.

Add geometry support (optional)

If you plan to work with geometry (Point, Line, Mesh, Brep, and other primitives), also install Speckle.Objects:
dotnet add package Speckle.Objects
Speckle.Objects is a separate package from Speckle.Sdk. The core SDK handles sending, receiving, and the object model; Speckle.Objects adds the default geometry types built on top of it.

Register the SDK (one-time bootstrap)

Speckle.Sdk uses Microsoft.Extensions.DependencyInjection internally. Script authors: use the canonical bootstrap in Automate with scripts — do not duplicate it here. Connector authors: register on your app’s IServiceCollection:
https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251Example
using Microsoft.Extensions.DependencyInjection;
using Speckle.Sdk;

var services = new ServiceCollection();
services.AddSpeckleSdk(new Application("My App", "my-app"), "1.0.0");
var provider = services.BuildServiceProvider();
Pass Speckle.Objects or custom type assemblies in AddSpeckleSdk when you receive those types — see Automate with scripts for the full bootstrap with assemblies.

Verify installation

Confirm the package resolves and the SDK registers correctly:
https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251Example
using Microsoft.Extensions.DependencyInjection;
using Speckle.Sdk;
using Speckle.Sdk.Api;

var services = new ServiceCollection();
services.AddSpeckleSdk(new Application("My App", "my-app"), "1.0.0");
var provider = services.BuildServiceProvider();

var operations = provider.GetRequiredService<IOperations>();
Console.WriteLine("Speckle.Sdk registered successfully!");

Dependencies

Speckle.Sdk brings in these dependencies automatically:
PackagePurpose
Microsoft.Extensions.DependencyInjectionService registration and resolution
Microsoft.Extensions.LoggingStructured logging
GraphQL.ClientGraphQL client for Speckle Server’s API
Microsoft.Data.SqliteLocal object and account caching
Speckle.Newtonsoft.JsonSerialization
Speckle.DoubleNumericsNumeric types used by the object model
You don’t need to install these manually — NuGet handles them automatically. Speckle.Sdk.Dependencies bundles additional transitive dependencies and should not be referenced directly.

FAQ

Speckle.Sdk is required for sending, receiving, and the object model. Add Speckle.Objects when you use built-in geometry types (Point, Line, Mesh, and so on). Pass the Speckle.Objects assembly in AddSpeckleSdk so those types deserialize on receive.
No. You paste a short AddSpeckleSdk block once — see Automate with scripts. Read Dependency injection (connectors) only if you are building a connector or sharing a container with a host app.
Match your host app. Use netstandard2.0 for older hosts such as Revit on .NET Framework 4.8. Use net8.0 or net10.0 for new standalone apps and services.

Next Steps

Build your first model analysis tool

End-to-end load, traverse, and CSV export

Automate with scripts

Canonical bootstrap and Send2

Authentication

Connect with a personal access token
Last modified on July 10, 2026