Editing Modding Tutorials/Setting up a solution
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 6: | Line 6: | ||
=Requirements= | =Requirements= | ||
− | * | + | * This tutorial requires you to have [[Modding_Tutorials/Mod_folder_structure#The Source and Assemblies folders|set up a Source and Assemblies folder]]. |
* You will want to have an IDE installed: [[Modding Tutorials/Recommended software#IDE's|Recommended IDE's]].<br/><br/> | * You will want to have an IDE installed: [[Modding Tutorials/Recommended software#IDE's|Recommended IDE's]].<br/><br/> | ||
=Setting up a solution= | =Setting up a solution= | ||
Setting up can be different for different IDE's. Feel free to add '''''complete''''' instructions for your IDE of choice. | Setting up can be different for different IDE's. Feel free to add '''''complete''''' instructions for your IDE of choice. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Sharpdevelop=== | ===Sharpdevelop=== | ||
− | |||
− | |||
# Create a new class library project in your [[Modding Tutorials/Recommended software#IDE.27s|IDE of choice]]; | # Create a new class library project in your [[Modding Tutorials/Recommended software#IDE.27s|IDE of choice]]; | ||
## Go to File -> New -> Solution; | ## Go to File -> New -> Solution; | ||
Line 90: | Line 20: | ||
## ''Optional'': Untick "Create a directory for solution"/"Create a project within the solution directory", | ## ''Optional'': Untick "Create a directory for solution"/"Create a project within the solution directory", | ||
# In your project, add references to Assembly-CSharp.dll and UnityEngine.dll: | # In your project, add references to Assembly-CSharp.dll and UnityEngine.dll: | ||
+ | ## Copy these files:<br/><pre>(RimWorldInstallFolder)/RimWorld_Data/Managed/Assembly-CSharp.dll (RimWorldInstallFolder)/RimWorld_Data/Managed/UnityEngine.dll</pre> | ||
+ | ## Place them in your project:<br/><pre>(RimWorldInstallFolder)/Mods/(YourModName)/Source/(YourSolutionName)/Source-DLLs</pre> | ||
## In your IDE project file browser, right-click the "References" folder and "Add reference"; | ## In your IDE project file browser, right-click the "References" folder and "Add reference"; | ||
− | ## Choose the ".NET Assembly Browser" tab and "Browse | + | ## Choose the ".NET Assembly Browser" tab and "Browse", go to the folder you placed the copied DLLs; |
− | ## | + | ## Choose both DLLs and click OK, |
− | + | # In your project properties, change the target framework to .NET 3.5: | |
− | + | ## In your IDE project file browser, right-click "Solution (YourSolutionName)" or just "(YourSolutionName)"; | |
− | # In your project properties, change the target framework to .NET | ||
− | ## In your IDE project file browser, right-click "(YourSolutionName)"; | ||
## Choose Properties; | ## Choose Properties; | ||
− | ## Go to the "Compiling" tab, "Output", "Target framework", "Change" and choose ".NET Framework | + | ## Go to the "Compiling" tab, "Output", "Target framework", "Change" and choose ".NET Framework 3.5", |
# In your project properties, change the build events so only a single file is built: | # In your project properties, change the build events so only a single file is built: | ||
− | ## | + | ## Change the debug info to "No debug information"; |
− | ## Right-click your .cs files -> Properties and change | + | ## In the References folder, right-click Assembly-CSharp -> Properties and change "Local copy" to False. Do the same for UnityEngine; |
+ | ## Right-click your .cs files -> Properties and change "Copy to out" to Never, | ||
# In your project properties, fix the output location to put the DLL in the Assemblies folder: | # In your project properties, fix the output location to put the DLL in the Assemblies folder: | ||
− | ## | + | ## Change the output path to "..\..\Assemblies\".<br/><br/> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=See also= | =See also= |