KSP1Retooled.BuildTools 2.0.1

dotnet add package KSP1Retooled.BuildTools --version 2.0.1
                    
NuGet\Install-Package KSP1Retooled.BuildTools -Version 2.0.1
                    
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="KSP1Retooled.BuildTools" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KSP1Retooled.BuildTools" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="KSP1Retooled.BuildTools" />
                    
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 KSP1Retooled.BuildTools --version 2.0.1
                    
#r "nuget: KSP1Retooled.BuildTools, 2.0.1"
                    
#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 KSP1Retooled.BuildTools@2.0.1
                    
#: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=KSP1Retooled.BuildTools&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=KSP1Retooled.BuildTools&version=2.0.1
                    
Install as a Cake Tool

KSP1Retooled Build Tools

Documentation Status CI NuGet Version

This repository provides a common set of tools for developing mods for Kerbal Space Program and KSP Retooled. It integrates with MSBuild to simplify setting up plugins, and integrates with CKAN to easily reference other mods. it also includes a set of CI actions for automating builds.

Full Documentation

Installation

Run dotnet add package KSP1Retooled.BuildTools on your project, or add

<ItemGroup>
  <PackageReference Include="KSP1Retooled.BuildTools"/> 
</ItemGroup>

to the .csproj file. Pinning the version is highly recommended.

Usage

Once you have a KSP installation to link to, all the game DLLs will be automatically included in your project automatically.

Configure your mod's location in GameData and where to put the output DLLs


<KSPBT_ModRoot>$(MSBuildThisFileDirectory)/../GameData/$(MSBuildProjectName)</KSPBT_ModRoot>
<KSPBT_ModPluginFolder>plugins</KSPBT_ModPluginFolder>

Reference dependency mods in your DLL by adding ModReference items to the project. They will be automatically installed using CKAN.


<ItemGroup>
  <ModReference Include="Modulemanager">
    <DLLPath>GameData/Modulemanager*.dll</DLLPath>
    <CKANIdentifier>ModuleManager</CKANIdentifier>
  </ModReference>
  <ModReference Include="0Harmony">
    <DLLPath>GameData/000_Harmony/0Harmony.dll</DLLPath>
    <CKANIdentifier>Harmony2</CKANIdentifier>
  </ModReference>
</ItemGroup>

Auto-generate version files from your project's FileVersion. This works well with minver.


<ItemGroup>
  <KSPVersionFile Include=".">
    <Destination>$(KSPBT_ModRoot)/mymod.version</Destination>
    <URL>https://github.com/username/repo/releases/latest/download/mymod.version</URL>
    <Download>https://github.com/username.repo/releases/latest</Download>
  </KSPVersionFile>
</ItemGroup>

From there you should be able to build your mod with just dotnet build

KSP Retooled

Whether you are building for stock KSP or for KSP Retooled is detected from your KSP install. When building for Retooled the KSP_RETOOLED and UNITY_6_7 symbols are defined.

To build for both, set the path to each install in your .csproj.user file. Your mod then gets a MyMod.dll for stock KSP and a MyMod.Retooled.1.13.dll for Retooled, and each game loads the right one.

<KSPBT_StockGameRoot>C:\Games\Kerbal Space Program</KSPBT_StockGameRoot>
<KSPBT_RetooledGameRoot>C:\Games\KSP Retooled</KSPBT_RetooledGameRoot>

For more details, see the MSBuild section in the docs.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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
2.0.1 6 11/6/2026
2.0.0 47 11/6/2026