Skip to main content

Setting up a MonoDevelop solution and project for RimWorld modding

1 min read (215 words)

Sidebar

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](/2016/07/20/rimworld-install-monodevelop-with-dot-net-3.5/).

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.

rubenwardy's profile picture, the letter R

Hi, I'm Andrew Ward. I'm a software developer, an open source maintainer, and a graduate from the University of Bristol. I’m a core developer for Luanti, an open source voxel game engine.

Comments

Leave comment

Shown publicly next to your comment. Leave blank to show as "Anonymous".
Optional, to notify you if rubenwardy replies. Not shown publicly.
Max 1800 characters. You may use plain text, HTML, or Markdown.