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

# .NET

> Learn how to quickly set up Decipher in your .NET application.

> [!TIP]
>
> **⏱ Estimated Time To Completion: 5 minutes**

> [!NOTE]
>
> Please make sure you've [installed Decipher for your frontend](https://docs.getdecipher.com/pages/browser-quickstart.md) via Sentry before continuing.

**1. Install the SDK**

Decipher uses the Sentry SDK to collect runtime data from your application. Installation is simple:

```shell .NET Core CLI theme={null}
dotnet add package Sentry -v 4.9.0
```

```shell Package Manager theme={null}
Install-Package Sentry -Version 4.9.0
```

```shell Paket CLI theme={null}
paket add Sentry --version 4.9.0
```

**2. Initialize the SDK**

Initialize the SDK as soon as possible in your application's runtime.

```csharp theme={null}
SentrySdk.Init(options =>
{
    options.Dsn = "YOUR_DECIPHER_DSN"; // Get this at https://app.getdecipher.com/settings?section=projects
    options.Debug = true;
    options.AutoSessionTracking = true;
    options.TracesSampleRate = 1.0f;
    options.ProfilesSampleRate = 1.0f;
});
```

You can get the `Dsn` parameter by logging into [Decipher](https://app.getdecipher.com) with your work email. On the [Settings > Projects](https://app.getdecipher.com/settings?section=projects) page, select a new project name and click "**Create New Project**". Decipher will generate a DSN to that you can paste.

**3. Test the integration**

The SDK will automatically capture unhandled exceptions that are thrown.
You can also capture errors by calling `CaptureException` explicitly.

```csharp C# theme={null}
using Sentry;
try
{
    throw null;
}
catch (Exception ex)
{
    SentrySdk.CaptureException(ex);
}
```

Check out the [Decipher dashboard](https://app.getdecipher.com) to see information about your captured error.
Decipher will automatically analyze and group your errors to highlight the important, high-impact ones.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.