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 1: | Line 1: | ||
{{BackToTutorials}} | {{BackToTutorials}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
# 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]]; | ||
Line 88: | Line 6: | ||
## Enter a project name (solution name automatically updated); | ## Enter a project name (solution name automatically updated); | ||
## Choose a location, preferably:<br/><pre>(RimWorldInstallFolder)/Mods/(YourModName)/Source</pre> | ## Choose a location, preferably:<br/><pre>(RimWorldInstallFolder)/Mods/(YourModName)/Source</pre> | ||
− | ## | + | ## 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); | |
− | # In your project properties, change the target framework to .NET | ||
− | ## In your IDE project file browser, right-click | ||
## 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\". |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Modding tutorials]] | [[Category:Modding tutorials]] |