This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com

Modding:IDE reference:JetBrains Rider

From Stardew Valley Wiki
Jump to: navigation, search

Index

This page is a quick reference on how to get started creating a Jetbrains Rider solution geared towards SMAPI

Creating the Solution and setting the framework target

  1. Open JetBrains Rider
  2. Click + New Solution from the start up screen
    Modding - IDE reference - new solution (JBR).png
  3. In the left side panel under the .NET section, select Class Library and make sure to use framework version 4.5.0, 4.5.1 or 4.5.2
    Modding - IDE reference - class library (JBR).png
  4. On this page you can also enter a solution name and directory in the respective fields
  5. Make sure to enter a descriptive mod name, without spaces, and make sure to capitalize each first letter of a word to make clear where a word begins and ends. For example: "PineapplesAreEverywhereHelpMe"
  6. Upon creating the solution, JetBrains Rider will automatically create an empty Class file template for you
    Modding - IDE reference - default class file template (JBR).png


Importing a DLL from NuGet

  1. Click the Tools tab on the toolbar at the top of the screen (or press ctrl + T) and then select NuGet and then select Show NuGet Packages.
    Modding - IDE reference - open NuGet (JBR).png
  2. In the window that should have appeared at the bottom left of your screen, type "Stardew", select Pathoschild.Stardew.ModBuildConfig and to the right in the bar that shows your solution name, press the green +
    Modding - IDE reference - install dll (JBR).png

Finding your DLL

  1. In the left panel Solution, right click the solution of your solution's name and click Show in Explorer
    Modding - IDE reference - Show in Explorer (JBR).png
  2. Open the bin folder and either the debug or release folder depending on how you built your project. Those files are what you put inside a folder with your mod's name inside the SMAPI mods folder.
    Modding - IDE reference - locate DLL.png