Setting up a MonoDevelop solution and project for RimWorld modding

This tutorial will show you how to create a new MonoDevelop solution and project, and how to properly connect it to RimWorld. You’ll need to have an installation of Mono that supports .NET 3.5 - here is a tutorial on how to install it.

  • Open Monodevelop (see this guide to install with .NET 3.5 support)
  • Create a new solution
    • Click File > New > Solution
    • Select the C# tab
    • Select Library (C#)
    • Enter your mod’s name into the name field.
    • Set the location to “Source” in your mod’s directory. Eg, RimWorld/mods/ModName/Source.
    • Optional: Untick “Create a directory for solution”/”Create a project within the solution directory”.
  • Add references to the RimWorld DLL
    • In the left panel, right click ModName > ModName > References. Select Edit References.
    • Go to the .NET Assembly tab
    • Click browse and go to RimWorld/RimWorldLinux_Data/Managed. Select Assembly-CSharp.dll and UnityEngine.dll
    • Click open and then exit the edit references dialog.
    • For each reference, right click and decheck “local copy”.
  • Set .NET framework to .NET 3.5
    • Right click project (ModName > Modname) in the left panel and select options
    • Go to Build > General
    • Select Mono / .NET 3.5 in the target framework
  • Set output directory
    • Go to Build > Output
    • Set the output folder to RimWorld/mods/ModName/Assemblies.
  • Profit!

Some of this information was learned from this wiki page.


Comments are currently disabled whilst we remove the dependency on a third party service which was taken offline. In the meantime, feel free to send a message to me on Twitter.