Skip to main content
Building from source is intended for contributors who want to modify or extend the engine itself. If your goal is to create games, install s&box from Steam instead — it requires no compilation and stays up to date automatically.
This guide covers cloning the repository, running the bootstrap build, and opening the engine solution so you can make changes and submit contributions.

Prerequisites

Install the following before you start:
  • Git — required to clone the repository.
  • Visual Studio 2022 or later — with the .NET desktop development workload enabled in the installer.
  • .NET 10 SDK — required to compile the engine and run the build tools.
Visual Studio 2022 is the minimum version. Earlier versions of Visual Studio do not support the .slnx solution format used by this project.

Build steps

1

Clone the repository

Open a terminal and clone the public engine repository:
git clone https://github.com/Facepunch/sbox-public.git
This creates an sbox-public/ directory containing the full engine source tree.
2

Run Bootstrap.bat

Navigate to the repository root and run the bootstrap script:
Bootstrap.bat
The script runs the SboxBuild tool three times in sequence:
StepWhat it does
build --config DeveloperCompiles the C# engine assemblies in developer configuration
build-shadersCompiles HLSL/GLSL shader source files
build-contentPackages engine content assets
Allow several minutes for the first run. Subsequent builds are faster because incremental outputs are cached.
If the script fails part-way through, check that the .NET 10 SDK is on your PATH by running dotnet --version in a fresh terminal.
3

Open the engine solution

Once the build succeeds, open the engine solution in Visual Studio:
engine/Sandbox-Engine.slnx
The .slnx format is a modern, XML-free solution file supported by Visual Studio 2022 and later. All engine projects load from this single solution.
4

Build and run from Visual Studio

Select the Developer solution configuration in the Visual Studio toolbar and press F5 or Build → Build Solution (Ctrl+Shift+B).After a successful build, the output binaries are placed in the game/ folder. Run the executable from there to launch the editor with your locally compiled engine.

Repository layout

PathContents
engine/C# engine source and the Sandbox-Engine.slnx solution
engine/Tools/SboxBuild/The SboxBuild MSBuild tool invoked by Bootstrap.bat
game/Compiled binaries and engine content (output of the build)
game/bin/Native binaries distributed under the s&box EULA
game/thirdpartylegalnoticesThird-party license notices
The native binaries in game/bin/ are not covered by the MIT license. They are distributed under the s&box EULA, which you must agree to in order to use them.

Contributing

After making changes, see the contributing guidelines before opening a pull request. Bug reports and feature requests go to the sbox-issues tracker.

Next steps

Contributing overview

Learn how the contribution workflow is structured and what kinds of changes are welcome.

Contributing guidelines

Code style, commit conventions, and review expectations.

Build docs developers (and LLMs) love