> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/flatredball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/flatredball/flatredball-source/linking-fna.md).

# Linking FNA

### Introduction

By default FlatRedBall projects link pre-built binary files including prebuilt FNA libraries. You may want to link your FlatRedBall project to FNA source for improved debuggability or to contribute back to FNA.

This document includes the required steps for linking your game to FNA.

### Linking Your Game to FRB Source

Before you link your game to FNA, you must first link your game to FRB source. If you do not do this, then the FlatRedBall.FNA nuget package will include FNA which results in the FNA libraries being included twice.

Follow the steps outlined here to link your game to source: [Linking your Game to FlatRedBall Source](/flatredball/flatredball-source.md#adding-flatredball-source-to-a-game-project-using-the-frb-editor).

Once you have finished these steps, your solution should include your game project and all FlatRedBall source projects.

<figure><img src="/files/JiWMTJhLgOtrnpvpXibw" alt=""><figcaption><p>A game named FnaTest4 linking all FlatRedBall FNA source projects</p></figcaption></figure>

{% hint style="info" %}
FNA is a submodule of the FlatRedBall repository so be sure you clone FlatRedBall recursively to get FNA.
{% endhint %}

### Linking Latest Native Libraries

By default FlatRedBall templates include FNA binaries which are marked as copy if newer. These can be found in your game's csproj at the root level:

<figure><img src="/files/TzytS2Om1bcc8UGpFsv7" alt=""><figcaption><p>FNA native libraries in a game</p></figcaption></figure>

These are marked as copy if newer:

<figure><img src="/files/AIAvrO094e9O9kdI7EXM" alt=""><figcaption><p>One of the FNA files marked as Copy if newer</p></figcaption></figure>

If you would like to update these to the latest version, you can:

1. Download the latest daily files from <https://github.com/FNA-XNA/fnalibs-dailies/actions>
2. Unzip the folder for x64
3. Copy the files into your game project

The latest .dll files will now be copied to your bin folder whenever the game is built.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/flatredball/flatredball-source/linking-fna.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
