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

# C# PlayFab SDK

> Overview of the PlayFab C# SDK for .NET games, tools, and cloud services, with download links, NuGet package, and quickstart guidance.

<img src="https://mintcdn.com/microsoft-4404708b/N3T1ucKV7zIMBudj/images/playfab/sdks/c-sharp/csharp1.png?fit=max&auto=format&n=N3T1ucKV7zIMBudj&q=85&s=aa7627d062ecb9ac2066615074906e13" alt="C# Image" width="800" height="250" data-path="images/playfab/sdks/c-sharp/csharp1.png" />

This C# SDK is used in the .NET environment. It's built primarily for game services, tools, and applications designed to run on Cloud, Windows, and any other platform supported by .NET.

## Download links

* [C# PlayFab SDK GitHub repo](https://github.com/PlayFab/CSharpSDK)
* [NuGet package for C# PlayFab SDK](https://www.nuget.org/packages/PlayFabAllSDK/)
* [Quick download link for C# PlayFab SDK](https://aka.ms/playfabCsharpsdkdownload)

This SDK is generated using our open-sourced tool—[SDKGenerator](/services/playfab/sdks/sdkgenerator). We generally build SDKs every other week to stay current with the latest API changes.

## Key components in this SDK

This C# PlayFab SDK package consists of three different API combinations.

1. PlayFabClientSDK - Contains only client libraries and is designed for integration in your game client.
2. PlayFabServerSDK - Contains only server and admin APIs and is designed for integration in your custom logic server or build process.
3. PlayFabSDK - Contains all APIs in one SDK (client, server, and admin) and a unit-test project.

## When not to use this SDK

The C# PlayFab SDK shouldn't be used if there's a more specific SDK that is suited for your project.

Specific PlayFab SDK is available for:

* [Unity PlayFab SDK GitHub repo](https://github.com/PlayFab/UnitySDK)

For a full list of the different PlayFab SDKs, see [PlayFab SDK](/services/playfab/sdks/playfab-sdk-intro).

## Using the SDK

This native C# project can be used in these two ways.

* Admin tools for maintaining your game
  * Usually, you want to make synchronous calls back-to-back.
  * Each API call locks the program while it's executing, but that's not an issue for this type of program.
  * See the comment about `loginTask.Wait()` in the example code. This synchronizing pattern is common for API calls from tools.

* An actual game coded in native C#
  * You need to take advantage of the async nature of API calls, and the C# async/await feature keywords. For more information about asynchronous programming, see [Asynchronous Programming with async and await (C#)](https://learn.microsoft.com/en-us/dotnet/csharp/async).

## Add SDK to your project

* [Quickstart to add C# client SDK](/services/playfab/sdks/c-sharp/quickstart)

Alternatively, you can install the NuGet package into your Visual Studio project using the NuGet Package Manager. For instructions, see [Install and use a package in Visual Studio](https://learn.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio). For more information, see [Getting started with NuGet](https://learn.microsoft.com/en-us/nuget/what-is-nuget).


## Related topics

- [C# PlayFab SDK](/services/playfab/sdks/c-sharp/index.md)
- [PlayFab SDK](/zh-CN/services/playfab/sdks/playfab-sdk-intro.md)
- [Legacy C++ PlayFab SDK](/services/playfab/sdks/playfab-cpp/index.md)
- [旧版 C++ PlayFab SDK](/zh-CN/services/playfab/sdks/playfab-cpp/index.md)
- [PlayFab Services SDK](/services/playfab/sdks/c/index.md)
