Get SpatialOS


These are the docs for 13.3, an old version of SpatialOS. The docs for this version are frozen: we do not correct, update or republish them. 13.4 is the newest →


The C# worker SDK assumes that you have the 64-bit version of Mono installed on your machine, and that it is present in your PATH environment variable. This should include the mono executable, the Mono runtime, and a build toolset, such as xbuild or MSBuild. The SpatialOS deployment clusters have version or newer installed, which is the environment managed workers will run in.


  1. Follow the standard SpatialOS setup guide (Windows / macOS / Linux).

  2. Install Mono using the installation guides: (Windows / macOS / Linux).

  3. (Windows only) Install C++ Redistributable for Visual Studio 2015 required for running workers locally.



There are several potential issues with Mono versions from 5.0.0 onwards on Windows. These are a result of Mono deprecating xbuild and replacing it with Microsoft’s MSBuild and both toolsets being included in Mono installations. SpatialOS csharp generated build scripts for C# workers use xbuild by default which can sometimes cause issues.

Switching to your generated build scripts to csharp_msbuild which uses MSBuild is a workaround for this, however, you can still encounter tricky compiler errors, such as a csc error. These can occur if you already have another MSBuild installation from elsewhere (like Visual Studio). As a workaround for this bug, ensure your other MSBuild implementation (likely from Visual Studio) is present in your PATH environment variable before mono. This will cause Mono’s MSBuild to use the csc compiler in Visual Studio instead.


Note that the macOS version of Mono is distributed as a universal binary, which requires --arch=64 to be passed to the command line when launching your worker.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums