# Synced Projects

### Introduction

Synced Projects provide a way to create and keep multiple projects in sync when working with multiple platforms. Typically the main project is a DesktopGL project, and synced projects would be for other platforms such as Android or Web.

![A main project targeting XNA 4 with synced projects for iOS and Android](/files/QmpPfkci0fzVo1X9aHmj)

A synced project is a completely separate .sln and .csproj which is initially created by the FlatRedBall Editor when the new Synced project is created.

Synced projects can be added to the same root folder as the main project. Therefore, a typical game might look like this:

* MainProject (folder)
  * MainProject.sln
  * MainProject (folder containing original project like DesktopGL
    * MainProject.csproj (csproj for original project)
  * MainProjectWeb (folder for new synced project)
    * MainProjectWeb.sln

When a new synced project is created, FlatRedBall performs the following functionality automatically:

* Generated and custom code files for screens and entities are automatically linked in the synced project
* All content files are either linked in the synced project, or custom versions are created and linked. For example, when XNB files are built, these may differ per-platform. FlatRedBall takes care of this automatically

You are still responsible for managing your own code files if you add them through Visual Studio.&#x20;

### Opening Synced Projects

To open a project, click on the icon for the IDE for a given project. For example, the following icon can be used to open the TownRaiser XNA 4 Project:

![](/files/wMII1QwquGNGJkBMpFVq)

### New Synced Project

New platforms can be added to an existing project at any point in development by adding a new synced project. To add a new synced project to an existing Glue project:

1. Open the **Projects** tab by selecting **Project** -> **View Projects**<br>

   <figure><img src="/files/QUUZm8IoxxHkzcndekGV" alt=""><figcaption><p>Projects tab</p></figcaption></figure>
2. Click the **New Synced Project** button
3. The New Project window appears. Select the desired platform such as **Web (Browsers)**
4. Enter a name for the project. Typically the name matches the original project's name with the platform appended. For example, MyProjectWeb.
5. Click the **Create Project!** button.

   ![Create project window for creating a new project ](/files/GYpo4FYlvd4lhOnIcrVb)

After creating the new synced project, it appears in the Projects tab.

![](/files/bUbLl6wx54jKUnnWL1jA)

Since FlatRedBall is designed to be syntactically identical across all platforms, most new synced projects compile and run with little or no modifications.

### Synced Project Behavior

New Synced Projects are created using a standard FlatRedBall template for the given platform. In other words, a synced project references FlatRedBall for the given platform in the same way as a new project.

Synced projects can reference pre-built FlatRedBall .dlls (directly or using NuGet), or they can be linked to FlatRedBall source. The following screenshot shows a FlatRedBall Web project linking to the FlatRedBall Engine.

<figure><img src="/files/iZRinA7dJyEAMZduzSB0" alt=""><figcaption><p>Synced project linking FlatRedBall source projects</p></figcaption></figure>

Synced projects automatically link all source files from the original project. This includes custom and generated code for screens, entities, and global content.&#x20;

<figure><img src="/files/xlqHq8jeiLwHVIVuQ321" alt=""><figcaption><p>Entity code files linked in a synced project</p></figcaption></figure>

Content files are also linked by the synced project.

<figure><img src="/files/9SaENfAaO6jGSV0YBDmF" alt=""><figcaption><p>Content files in GlobalContent folder linked in a synced project</p></figcaption></figure>

NuGet packages are not automatically synced across projects so if you have manually added a NuGet package to your main project, you may also need to add the same package or an alternative package to your synced projects.

{% hint style="info" %}
Keep in mind that some NuGet packages are not available on all platforms. For example, NAudio does not work on non-windows platforms like Web. You may need to find alternative NuGet packages if one is not available on your target platform. Alternatively you can use conditional compilation symbols as explained in the [Mult-Platform](/flatredball/glue-reference/multi-platform.md#conditional-compilation-symbols) page.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.flatredball.com/flatredball/glue-reference/multi-platform/synced-projects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
