<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rimworldwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Netdoorz</id>
	<title>RimWorld Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://rimworldwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Netdoorz"/>
	<link rel="alternate" type="text/html" href="https://rimworldwiki.com/wiki/Special:Contributions/Netdoorz"/>
	<updated>2026-04-06T03:12:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.8</generator>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Setting_up_a_solution&amp;diff=63594</id>
		<title>Modding Tutorials/Setting up a solution</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Setting_up_a_solution&amp;diff=63594"/>
		<updated>2019-05-23T06:52:28Z</updated>

		<summary type="html">&lt;p&gt;Netdoorz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BackToTutorials}}&lt;br /&gt;
{{Credit|[[User:Alistaire|Alistaire]]}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this tutorial you will learn how to set up a solution, along with instructions on setting the output directory and files for more convenient building right into the Assemblies folder.&lt;br /&gt;
&lt;br /&gt;
=Requirements= &lt;br /&gt;
&lt;br /&gt;
* The manual option in this tutorial requires you to have [[Modding_Tutorials/Mod_folder_structure#The Source and Assemblies folders|set up a Source and Assemblies folder]] (the Visual Studio automatic option sets this up for you).&lt;br /&gt;
* You will want to have an IDE installed: [[Modding Tutorials/Recommended software#IDE's|Recommended IDE's]].&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Setting up a solution=&lt;br /&gt;
Setting up can be different for different IDE's. Feel free to add '''''complete''''' instructions for your IDE of choice.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio Community 2017===&lt;br /&gt;
''NOTE: Visual Studio 2017 is a rather heavy application (2-3 GB for basic functionality) but has a bit more functionality. Only Install if your computer can handle it! The tutorial is similar for Visual Studio 2015.'' '''[http://netdoorz.com/uninstall-firefox-from-your-computer/ uninstall firefox]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Option 1 (Manual Method):====&lt;br /&gt;
# Create a new class library project&lt;br /&gt;
## Once loaded, go to File -&amp;gt; New -&amp;gt; Project...&lt;br /&gt;
## Go to Templates -&amp;gt; Visual C# -&amp;gt; Class Library (Be sure to select the *.NET Framework* version, not *.NET Standard*) [[File:Capture.png|200px|thumb|right|Installing the .NET framework]]&lt;br /&gt;
## Enter your name and solution name in the lower pane.&lt;br /&gt;
## Choose a location, preferably:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;(RimWorldInstallFolder)/Mods/(YourModName)/Source&amp;lt;/pre&amp;gt;&lt;br /&gt;
## ''Optional'': Untick &amp;quot;Create directory for solution&amp;quot;&lt;br /&gt;
# In your project, set target framework and various other porperties&lt;br /&gt;
## In your Solution Explorer, right click your project -&amp;gt; Properties&lt;br /&gt;
## Once in your properties, select Application -&amp;gt; Set Target Framework to .NET Framework 3.5 (No client profile)&lt;br /&gt;
## ''Optional'': Change your Assembly and Namespace names to anything of your choice&lt;br /&gt;
## Go to Build -&amp;gt; Advanced... and set &amp;quot;Debugging information&amp;quot; to none&lt;br /&gt;
## Leave Advanced..., and set the Output Path to &amp;quot;..\..\Assemblies\&amp;quot; (The Assemblies folder in your mod folder)&lt;br /&gt;
# Add references to RimWorld code&lt;br /&gt;
## Expand your project. Then right click &amp;quot;References&amp;quot; -&amp;gt; Add Reference...&lt;br /&gt;
## Click Browse...&lt;br /&gt;
## Navigate towards &amp;lt;pre&amp;gt;RimWorld******/RimWorld******_Data/Managed&amp;lt;/pre&amp;gt; and select files: &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.dll&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Click &amp;quot;Add&amp;quot;&lt;br /&gt;
## Click &amp;quot;OK&amp;quot; to close the Reference Manager.&lt;br /&gt;
## Right click on both Assembly-CSharp.dll and UnityEngine.dll and set Copy Local to False (Properties pane).&lt;br /&gt;
&lt;br /&gt;
====Option 2 (Automatic Method):====&lt;br /&gt;
This option uses the [https://ludeon.com/forums/index.php?topic=39038.0 Rimworld Mod Development Cookiecutter] tool.&amp;lt;/br&amp;gt;&lt;br /&gt;
'''Note: despite being automatic and potentially taking away some of the tedium away, the environment it sets up is very particular and this tool is currently not recommended for newcomers.'''&amp;lt;/br&amp;gt;&lt;br /&gt;
''As of Jan 2019, the cookiecutter is set up for Windows development.  Linux/Mac people can still use it, but they will have a few errors to clean up.''&amp;lt;/br&amp;gt;&lt;br /&gt;
# Open Visual Studio&lt;br /&gt;
# Once loaded, go to File -&amp;gt; New -&amp;gt; From Cookiecutter...&lt;br /&gt;
# Search for ''rimworld''&lt;br /&gt;
# Double-click ''cookiecutter-rimworld-mod-development''&lt;br /&gt;
# Change the Template Options:&lt;br /&gt;
## ''Create To'' =&amp;gt; ''Your/Rimworld/Mod/Directory''&lt;br /&gt;
## ''mod_name''&lt;br /&gt;
## ''namespace_name'' (don't change if unsure)&lt;br /&gt;
## ''author'' =&amp;gt; ''your steam username''&lt;br /&gt;
## ''target_version'' =&amp;gt; current RW version (can leave blank for most up-to-date)&lt;br /&gt;
## ''in_game_description'' (not required, can change later in About-Release.xml)&lt;br /&gt;
## ''url'' (can leave blank for link to your Steam Workshop profile)&lt;br /&gt;
# Click &amp;quot;Create and Open Folder&amp;quot;&lt;br /&gt;
'''[http://netdoorz.com/uninstall-firefox-from-your-computer/ how to uninstall firefox]'''&lt;br /&gt;
&lt;br /&gt;
===Sharpdevelop===&lt;br /&gt;
'''Caution:''' Sharpdevelop (or #develop) does NOT CURRENTLY allow for C# 6.0+ syntax without plugins and does NOT ALLOW for C# 7.0+ syntax at all. For your average project this does not matter, however some existing projects are already built entirely upon C# 6.0+ syntax which can not be compiled anymore in Sharpdevelop. Visual Studio does not have these issues and should be your go-to for compiling large projects such as Combat Extended.&lt;br /&gt;
&lt;br /&gt;
# Create a new class library project in your [[Modding Tutorials/Recommended software#IDE.27s|IDE of choice]];&lt;br /&gt;
## Go to File -&amp;gt; New -&amp;gt; Solution;&lt;br /&gt;
## Go to C# or .NET -&amp;gt; Library or Class Library (NOT portable);&lt;br /&gt;
## Enter a project name (solution name automatically updated);&lt;br /&gt;
## Choose a location, preferably:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;(RimWorldInstallFolder)/Mods/(YourModName)/Source&amp;lt;/pre&amp;gt;&lt;br /&gt;
## ''Optional'': Untick &amp;quot;Create a directory for solution&amp;quot;/&amp;quot;Create a project within the solution directory&amp;quot;,&lt;br /&gt;
# In your project, add references to Assembly-CSharp.dll and UnityEngine.dll:&lt;br /&gt;
## In your IDE project file browser, right-click the &amp;quot;References&amp;quot; folder and &amp;quot;Add reference&amp;quot;;&lt;br /&gt;
## Choose the &amp;quot;.NET Assembly Browser&amp;quot; tab and &amp;quot;Browse...&amp;quot;;&lt;br /&gt;
## Navigate towards &amp;lt;pre&amp;gt;RimWorld******/RimWorld******_Data/Managed&amp;lt;/pre&amp;gt; and select files: &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.dll&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Click &amp;quot;Open&amp;quot; then &amp;quot;OK&amp;quot;;&lt;br /&gt;
## In the References folder, right-click Assembly-CSharp -&amp;gt; Properties and change &amp;quot;Local copy&amp;quot; to False. Do the same for UnityEngine,&lt;br /&gt;
# In your project properties, change the target framework to .NET 3.5:&lt;br /&gt;
## In your IDE project file browser, right-click &amp;quot;(YourSolutionName)&amp;quot;;&lt;br /&gt;
## Choose Properties;&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Target framework&amp;quot;, &amp;quot;Change&amp;quot; and choose &amp;quot;.NET Framework 3.5&amp;quot;,&lt;br /&gt;
# In your project properties, change the build events so only a single file is built:&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Debug info&amp;quot; and choose &amp;quot;No debug information&amp;quot;;&lt;br /&gt;
## Right-click your .cs files -&amp;gt; Properties and change &amp;quot;Copy to output&amp;quot; (If you haven't resized the properties bar, this will be truncated to &amp;quot;Copy to out&amp;quot;) to Never,&lt;br /&gt;
# In your project properties, fix the output location to put the DLL in the Assemblies folder:&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Output path&amp;quot; and change the output path to &amp;quot;..\..\Assemblies\&amp;quot;.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Xamarin/MonoDevelop===&lt;br /&gt;
The setup is similar as the one above. A few special points to address:&lt;br /&gt;
# Mono 4.X isn't backward compatible so you may need to install an older 3.X version of Mono in order to compile against .NET3.5 dlls.&lt;br /&gt;
# Make sure you uncheck &amp;quot;Use MSBuild build engine (recommended for this project type)&amp;quot; under project &amp;gt; options &amp;gt; build &amp;gt; general   (You might find this by right-clicking on your project - not solution - name and selecting options)&lt;br /&gt;
# Changing the framework to 3.5 can be found (for Linux anyway) in the same place.&lt;br /&gt;
&lt;br /&gt;
More detailed installation instructions for Linux can be found [https://blog.rubenwardy.com/2016/07/21/rimworld-setup-monodevelop/ here] and [https://spdskatr.github.io/RWModdingResources/mono-arch here].&lt;br /&gt;
&lt;br /&gt;
===Rider (good for Mac)===&lt;br /&gt;
JetBrains Rider is a great cross-platform C# IDE, but it isn't cheap. It's $140 for the first year, including perpetual access to that version (access to future updates gets cheaper, but it's still over $100/year). However, the Early Access versions are a bit unstable but free. They also offer free student licenses.&lt;br /&gt;
&lt;br /&gt;
# Open Rider and click New Solution in the welcome dialog.&lt;br /&gt;
## Click Class Library under .NET on the left. The option may a second to show up.&lt;br /&gt;
## Under Solution Name (and Project Name), enter the name of your mod.&lt;br /&gt;
## Set the Solution Directory to [your mod folder]/Source.&lt;br /&gt;
## Optionally check &amp;quot;put solution and project in the same directory.&amp;quot; This is probably a good idea.&lt;br /&gt;
## Change Framework to .Net Framework 3.5.&lt;br /&gt;
## Click Create.&lt;br /&gt;
# In the left side bar, expand your solution, right click your project (mod name with &amp;quot;C#&amp;quot; icon) and click Properties.&lt;br /&gt;
## In the Properties window, select Configurations &amp;gt; Debug on the left and uncheck Debug Symbols.&lt;br /&gt;
## For both configurations, change the Output Path to ../../Assemblies.&lt;br /&gt;
## Click OK.&lt;br /&gt;
# Expand your project, right click References and click Add Reference.&lt;br /&gt;
## Click Add From.&lt;br /&gt;
## Browse to the folder with the RimWorld DLLs (Mac: /Users/[username]/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed).&lt;br /&gt;
## Select both Assembly-CSharp.dll and UnityEngine.dll and click OK.&lt;br /&gt;
## Expand Assemblies under References. For both of the assemblies that you just added:&lt;br /&gt;
### Right click the assembly and click Properties.&lt;br /&gt;
### Uncheck &amp;quot;Copy Local&amp;quot; (you may need to scroll down) and click OK.&lt;br /&gt;
&lt;br /&gt;
You're done! Note that Rider has a built-in decompiler—to view the source of a RimWorld class or method, just right-click its name and click Go To &amp;gt; Definition.&lt;br /&gt;
&lt;br /&gt;
=Common issues=&lt;br /&gt;
* Can't find the option to target .NET Framework 3.5? Due to its age, it may require additional installation steps. In Visual Studio, Tools =&amp;gt; Get Tools and features =&amp;gt; Individual Components =&amp;gt; Select ''.NET Framework 3.5 development tools'' (or google installation instructions). Also make sure your project is a ''Class Library (.NET '''Framework''')''. Not .NET Core or .NET Standard. &lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[Modding Tutorials/Writing custom code|Writing custom code]] continues on setting up your solution.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Netdoorz</name></author>
	</entry>
</feed>