---
title: Installing C# SDK
slug: v4-4/Md9j9mB1RVCGK9K7lgtvI
docTags: 
createdAt: 2023-08-03T04:50:58.447Z
---

You can integrate the Ditto SDK into C# projects to develop for a wide range of platforms.

:::hint{type="info"}
For a complete overview of the platforms, transports, and devices the C# SDK supports, see [Compatibility with C#](docId\:kqgF9zY_5O-BxytMVyMse).
:::

To install the C# SDK:

::::WorkflowBlock
:::WorkflowBlockItem
Confirm that you meet the minimum requirements. ([Prerequisites](docId:3WbW7rxiEC-ep8ZCGAQbf))
:::

:::WorkflowBlockItem
Prepare your environment for Ditto. ([Setting Up Your Environment](docId:3WbW7rxiEC-ep8ZCGAQbf))
:::

:::WorkflowBlockItem
Set up your app permissions. ([Configuring Permissions](docId:3WbW7rxiEC-ep8ZCGAQbf))
:::

:::WorkflowBlockItem
Add Ditto to your app. ([Integrating Ditto](docId:3WbW7rxiEC-ep8ZCGAQbf))
:::
::::

# Prerequisites

Following are the minimum requirements that must be met before attempting to install Ditto.

- [.NET Standard 2.1](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-1#net-standard-versions)&#x20;
- [.NET Core 3](https://dotnet.microsoft.com/en-us/download/dotnet/3.0)&#x20;
- [.NET Framework 4.0](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net40)

# Installing Dependencies

Using either the NuGet package manager, .NET CLI, or adding a reference to your `.csproj` XML file:

:::::Tabs
::::Tab{title="NuGet Package Manager"}
:::BlockQuote
Install-Package Ditto -Version 4.3.0
:::
::::

::::Tab{title=".NET CLI"}
:::BlockQuote
dotnet add package Ditto --version 4.3.0
:::
::::

::::Tab{title="CSProj XML"}
:::BlockQuote
\<PackageReference Include="Ditto" Version="4.3.0" />
:::
::::
:::::

:::hint{type="info"}
For the official .NET standard for Ditto, see the official NuGet reference at Packages > [Ditto](https://www.nuget.org/packages/Ditto/).
:::

# Integrating Ditto

Integrate Ditto with your app:

:::hint{type="info"}
For instructions on how to obtain your access credentials, see [Onboarding](docId\:JQjYL9gbvsgI9vlW3Ywvc). For an introduction to authentication in Ditto, see *Ditto Basics* > [Authentication and Initialization](docId\:c802C1qiAkfgA2QxmcyWu).
:::

```csharp
try
{
    DittoLogger.SetMinimumLogLevel(DittoLogLevel.Debug);
    var ditto = new Ditto(DittoIdentity.OnlinePlayground("REPLACE_ME_WITH_YOUR_APP_ID", "REPLACE_ME_WITH_YOUR_PLAYGROUND_TOKEN", true), path);
    ditto.StartSync();
}
catch (DittoException ex)
{
    Console.WriteLine($"Ditto Error {ex.Message}");
}
```

```csharp
var docId = ditto.Store.Collection("people").Upsert(
    new Dictionary<string, object> {
    { "name", "Susan" },
    { "age", 31 },
    }
);
```

