Keep the mod project separate from the installed game. The project contains source, a project file, and build output. Rain World supplies the local assemblies that describe the game API. The mod folder receives only test files.

Install a .NET SDK, then create an SDK-style class library project. The .NET CLI is included with the SDK, and dotnet build builds the project and its dependencies. Project file gives the complete checked project for the current BepInEx 5 and Rain World baseline.

References from the local installation

Add file references for the assemblies your code names. A basic Rain World plugin normally needs the installed BepInEx assembly, the generated hook assembly, the game assembly, and their framework or Unity dependencies. Let compiler errors tell you which further assembly supplies an unresolved type. The game installation is the source for these references, not a folder to copy into the project or release package.

Use HintPath so the project records where each local DLL came from. Set Private to false for every game, loader, hook, and Unity reference so MSBuild does not copy it beside the mod DLL. Pass the installation folder through the RainWorldPath MSBuild property or RAINWORLD_PATH environment variable. Do not commit a personal path.

The edit, build, copy loop

Start with First plugin and make one small change. Build the project with dotnet build MyMod.csproj -p:RainWorldPath="/full/path/to/Rain World". If the compiler succeeds, copy the resulting mod DLL into your own mod package under plugins, then enable the mod and restart through the normal game flow. Mod manifests explains the package metadata that makes the folder visible to Remix.

Treat build and game results as separate checks. Compilation checks C# syntax and referenced member signatures. It does not show that BepInEx discovered the DLL, a hook ran, or room state was valid.

When the loop breaks, identify its stage before changing code. A missing namespace during build usually means a reference or target mismatch. A loader exception after launch belongs in Reading error logs. A loaded plugin with no visible behavior needs a one-time marker and a narrow reproduction. Hook lifecycle covers subscription timing and orig.

Keep outputs disposable

Put compiler output in the project bin directory and copy one known DLL to the test package. Do not edit a DLL in place, and avoid keeping several old builds in the same plugins directory. Record the game build used for the reference set. This wiki’s inspected baseline is Rain World v1.11.8, Steam build 22785462. Runtime reference records the assembly identities. Operating systems distinguishes portable build tooling from the game process.

Before a broader test, confirm three concrete facts: the project built without errors, the copied DLL has the expected timestamp or hash, and the package has one intended plugin DLL. The next task is either Testing a mod for controlled runtime checks or Reading game code when a feature needs a game method.

Sources