> ## Documentation Index
> Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Set up a C# project for Speckle automation — NuGet packages and one-time bootstrap

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](/developers/sdks/dotnet/guides/build-your-first-model-analysis-tool), then [Automate with scripts](/developers/sdks/dotnet/getting-started/scripts-and-notebooks) for the canonical bootstrap snippet.

## Requirements

Speckle.Sdk targets three frameworks, so it runs in both modern and legacy host apps:

| Target framework | Typical use case                                     |
| ---------------- | ---------------------------------------------------- |
| `net10.0`        | New standalone .NET applications and services        |
| `net8.0`         | Current-generation .NET applications and services    |
| `netstandard2.0` | Older host apps, such as Revit on .NET Framework 4.8 |

<Check>
  Speckle.Sdk works on Windows, macOS, and Linux.
</Check>

## Install with the .NET CLI

```bash theme={null}
dotnet add package Speckle.Sdk
```

Or add the package reference directly to your `.csproj`:

```xml theme={null}
<ItemGroup>
  <PackageReference Include="Speckle.Sdk" Version="3.*" />
</ItemGroup>
```

### Install a specific version

```bash theme={null}
dotnet add package Speckle.Sdk --version 3.21.1
```

<Note>
  Check [NuGet](https://www.nuget.org/packages/Speckle.Sdk) for the latest published version before pinning — the version above is a point-in-time example, not a recommendation to stay on it.
</Note>

<Warning>
  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.
</Warning>

## Add geometry support (optional)

If you plan to work with geometry (`Point`, `Line`, `Mesh`, `Brep`, and other primitives), also install `Speckle.Objects`:

```bash theme={null}
dotnet add package Speckle.Objects
```

<Note>
  `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.
</Note>

## Register the SDK (one-time bootstrap)

Speckle.Sdk uses `Microsoft.Extensions.DependencyInjection` internally. **Script authors:** use the canonical bootstrap in [Automate with scripts](/developers/sdks/dotnet/getting-started/scripts-and-notebooks) — do not duplicate it here. **Connector authors:** register on your app's `IServiceCollection`:

```csharp Example lines icon="https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251" theme={null}
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();
```

<Note>
  Pass `Speckle.Objects` or custom type assemblies in `AddSpeckleSdk` when you receive those types — see [Automate with scripts](/developers/sdks/dotnet/getting-started/scripts-and-notebooks) for the full bootstrap with assemblies.
</Note>

## Verify installation

Confirm the package resolves and the SDK registers correctly:

```csharp Example lines icon="https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251" theme={null}
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:

| Package                                    | Purpose                                 |
| ------------------------------------------ | --------------------------------------- |
| `Microsoft.Extensions.DependencyInjection` | Service registration and resolution     |
| `Microsoft.Extensions.Logging`             | Structured logging                      |
| `GraphQL.Client`                           | GraphQL client for Speckle Server's API |
| `Microsoft.Data.Sqlite`                    | Local object and account caching        |
| `Speckle.Newtonsoft.Json`                  | Serialization                           |
| `Speckle.DoubleNumerics`                   | Numeric types used by the object model  |

<Info>
  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.
</Info>

## FAQ

<AccordionGroup>
  <Accordion title="Do I need both Speckle.Sdk and Speckle.Objects?">
    **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.
  </Accordion>

  <Accordion title="Do I need to understand dependency injection to install the SDK?">
    No. You paste a short `AddSpeckleSdk` block once — see [Automate with scripts](/developers/sdks/dotnet/getting-started/scripts-and-notebooks). Read [Dependency injection (connectors)](/developers/sdks/dotnet/concepts/dependency-injection) only if you are building a connector or sharing a container with a host app.
  </Accordion>

  <Accordion title="Which target framework should I use?">
    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.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={3}>
  <Card title="Build your first model analysis tool" icon="chart-bar" href="/developers/sdks/dotnet/guides/build-your-first-model-analysis-tool">
    End-to-end load, traverse, and CSV export
  </Card>

  <Card title="Automate with scripts" icon="terminal" href="/developers/sdks/dotnet/getting-started/scripts-and-notebooks">
    Canonical bootstrap and Send2
  </Card>

  <Card title="Authentication" icon="key" href="/developers/sdks/dotnet/getting-started/authentication">
    Connect with a personal access token
  </Card>
</CardGroup>
