Repository navigation
v0.1.0 - First public release
Released on 09/28/2026.
Write your XBOX game in C#, not in P/Invoke. XBOX GDK.NET is the .NET projection of the Microsoft GDK flat C API, exposing the Gaming Runtime, XBOX Services and PlayFab as ordinary modern C#: Task, IDisposable, events, exceptions and [Flags] enums in place of HRESULTs, raw handles, XAsyncBlocks and two-call size buffers.
Key highlights
- Gaming Runtime projected - users and sign-in, game invites and protocol activation, storage, packages and DLC, game saves, game UI, networking, capture and broadcast, the Store, game streaming, accessibility, speech and system metadata.
- XBOX Services projected - profile, achievements, social, presence, privacy, leaderboards, real-time activity, user and title-managed statistics, title storage, string verification, events and multiplayer activity, plus the social and achievements manager layers.
- PlayFab projected - Core and the full generated Services surface, Game Saves, Multiplayer (Lobby and Matchmaking), and Party including PartyXboxLive.
- NativeAOT ready - AOT safe on
net8.0andnet10.0, enforced by analyzers, warnings as errors and a real ILC compilation in CI, because consoles do not permit JIT. - Coverage is measured, not asserted - 349 of 355 Gaming Runtime exports and 1,006 of 1,008 PlayFab exports are bound, the remainder being deliberately out of scope. Run
eng/api-coverage.ps1for the current tally. - No native code of its own - every P/Invoke binds to a redistributable module the GDK already installs. XBOX Services and PlayFab are separate modules and opt-in at packaging time, so a title that does not use them does not carry them.
- Runs unpackaged - put
MicrosoftGame.configbeside the executable and a plaindotnet runworks on a dev-unlocked PC. Packaging remains what a title ships as, and is still exercised byeng/run-package-tests.ps1. - Samples and harnesses - a readable user sample, a PlayFab sample, and a live harness that exercises the pilot against a real signed-in account.
- Documented end to end - getting started, building, architecture, NativeAOT, title-implemented UI, the pinned GDK edition, and a generated API reference covering every public type and member.
Supported versions
| Target frameworks | net8.0, net10.0, netstandard2.0 (MonoGame / Mono reach) |
| Architectures | win-x64 (primary), win-arm64 |
| Microsoft GDK edition | 260404 (pinned) |
| Platform | Windows only |
Getting started
Building needs nothing but the .NET SDK:
git clone https://github.com/microsoft/XBOX-GDK-dotnet.git
cd XBOX-GDK-dotnet
dotnet restore
dotnet build -c Release
dotnet test -c Release --no-buildRunning against the Gaming Runtime needs an installed GDK, a dev-unlocked machine and a signed-in XBOX account:
pwsh eng/run-local.ps1 -Project Sample # readable demo, self-contained, unpackaged
pwsh eng/run-local.ps1 # the live harness, same
pwsh eng/run-package-tests.ps1 # the packaged path, which is what a title ships asRead Getting started next, or Projection status to see exactly what is projected and what is not.
Known limitations
- The multiplayer session directory, its manager layer, matchmaking and the raw HTTP escape hatch are deliberately out of scope, as are
XAsyncProvider.handXCurl.h. - 14 Gaming Runtime functions are not exported by
xgameruntime.thunks.dll, so no projection can reach them.eng/unexported-apis.mdrecords each one and its alternative. - Lobbies, matchmaking, Party and PartyXboxLive do not use
XAsyncBlock, so they are not awaitable. PumpProcessStateChangesonce per frame and match completions by operation id. - CI can only build, test and verify NativeAOT compilation. Behaviour is validated by hand in a packaged title against a real sandbox.
This is source, not a product
The projection is MIT licensed, but the Microsoft GDK and the PlayFab extension libraries it binds to are installed and licensed separately, consistent with other XBOX samples. There is no specified update cadence. We will watch the repo, monitor issues, and iterate where it makes sense. We are keen to hear your feedback and to see community PRs.
- Open an issue for bugs and feature requests
- Join us on Discord
- Please report security vulnerabilities to MSRC rather than via GitHub. See
SECURITY.md.