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

# Install

> Add the C# / .NET XDK from NuGet.

Install `XDevPlatform.Xdk` from [NuGet](https://www.nuget.org/packages/XDevPlatform.Xdk). Requires .NET 8.0+.

```bash .NET CLI theme={null}
dotnet add package XDevPlatform.Xdk
```

```xml PackageReference (.csproj) theme={null}
<ItemGroup>
  <PackageReference Include="XDevPlatform.Xdk" Version="0.1.2" />
</ItemGroup>
```

```powershell NuGet Package Manager theme={null}
Install-Package XDevPlatform.Xdk
```

## Custom `HttpClient`

In ASP.NET Core or worker services using `IHttpClientFactory`, pass a managed `HttpClient` via `XClientOptions.HttpClient`:

```csharp theme={null}
using System.Net.Http;
using Xdk;

var httpClient = new HttpClient();
var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
    HttpClient = httpClient,
});
```

## Build from source

```bash theme={null}
git clone https://github.com/xdevplatform/xdk-csharp.git
cd xdk-csharp
dotnet test
```

## Next steps

* [Quickstart](https://docs.x.com/xdks/csharp/quickstart.md)
* [Authentication](https://docs.x.com/xdks/csharp/authentication.md)
* [API Reference](https://docs.x.com/xdks/csharp/reference/overview.md)
