Krafs.Rimworld.Ref.Local 1.0.0

dotnet add package Krafs.Rimworld.Ref.Local --version 1.0.0
                    
NuGet\Install-Package Krafs.Rimworld.Ref.Local -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Krafs.Rimworld.Ref.Local" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Krafs.Rimworld.Ref.Local" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Krafs.Rimworld.Ref.Local">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Krafs.Rimworld.Ref.Local --version 1.0.0
                    
#r "nuget: Krafs.Rimworld.Ref.Local, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Krafs.Rimworld.Ref.Local@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Krafs.Rimworld.Ref.Local&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Krafs.Rimworld.Ref.Local&version=1.0.0
                    
Install as a Cake Tool

RimRef Local

RimRef (Krafs.Rimworld.Ref) gives your mod reference assemblies: the game's signatures without its code. That's all the compiler needs, but it means your IDE shows empty method bodies when you go to the definition of a game method.

RimRef Local fixes that on your machine. In Debug builds, if your installed RimWorld matches your RimRef version, your project compiles against the game's own assemblies instead, so your IDE shows the game's real code. Release builds, and machines without RimWorld such as CI, keep using RimRef.

It works with RimWorld 1.0 to 1.7.

Getting started

Next to your RimRef PackageReference, add:

<PackageReference Include="Krafs.Rimworld.Ref.Local" Version="1.0.0" PrivateAssets="all" />

Or skip the package. It's a single file: save Krafs.Rimworld.Ref.Local.targets as Directory.Build.targets next to your .csproj or in any parent folder. Already have one? Save it under its own name and add <Import Project="Krafs.Rimworld.Ref.Local.targets" /> to yours.

Your build output tells you whether or not your RimWorld was used, and why. On the command line, use dotnet build -tl:off.

Finding RimWorld

RimWorld is found in this order:

  1. RimWorldDirectory, if you set it in your project, a Directory.Build.props or an environment variable.
  2. Your RimWorld folder, if your project is inside it, such as in RimWorld/Mods/MyMod.
  3. Your Steam libraries.

Settings

Property Default
RimWorldDirectory Your RimWorld folder, if it isn't found as above.
UseLocalRimWorldAssemblies true in Debug false turns it off, true turns it on in any configuration.
UseStrictRimWorldVersionComparison true false also uses your RimWorld when only the first two parts of the version match, like 1.6.4850 and 1.6.4871.

Turning off strict comparison is convenient when Steam has updated the game but you haven't updated RimRef yet. Your Debug and Release builds may then see different game code.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 184 10/20/2026