KSPBuildTools 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package KSPBuildTools --version 1.0.0
                    
NuGet\Install-Package KSPBuildTools -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="KSPBuildTools" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KSPBuildTools" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="KSPBuildTools" />
                    
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 KSPBuildTools --version 1.0.0
                    
#r "nuget: KSPBuildTools, 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 KSPBuildTools@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=KSPBuildTools&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=KSPBuildTools&version=1.0.0
                    
Install as a Cake Tool

KSP Build Tools

Documentation Status CI NuGet Version

This repository provides a common set of tools for developing mods for Kerbal Space Program. 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 KSPBuildTools on your project, or add

<ItemGroup>
  <PackageReference Include="KSPBuildTools"/> 
</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

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 (2)

Showing the top 2 popular GitHub repositories that depend on KSPBuildTools:

Repository Stars
KSP-KOS/KOS
Fully programmable autopilot mod for KSP. Originally By Nivekk
KSPModStewards/SCANsat
Real Scanning, Real Science, at Warp Speed!
Version Downloads Last Updated
1.1.1 680 12/1/2025
1.1.0 278 11/30/2025
1.0.1 196 11/25/2025
1.0.0 424 11/20/2025
1.0.0-rc.1 370 11/19/2025
1.0.0-alpha.3 229 11/14/2025
1.0.0-alpha.2 207 11/7/2025
1.0.0-alpha.1 164 10/31/2025
0.1.0-alpha.1 323 8/6/2025
0.0.5 202 11/7/2025
0.0.4 776 6/15/2025
0.0.3 496 12/16/2024
0.0.3-alpha.4 300 2/19/2025
0.0.3-alpha.3 196 2/7/2025
0.0.3-alpha.2 223 2/7/2025
0.0.3-alpha.1 209 11/18/2024
0.0.2 323 10/24/2024
0.0.2-alpha.7 432 10/9/2024
0.0.2-alpha.6 187 10/5/2024
0.0.2-alpha.5 224 9/21/2024
0.0.2-alpha.4 250 9/13/2024
0.0.2-alpha.3 190 9/11/2024
0.0.2-alpha.2 198 9/9/2024
0.0.2-alpha.1 189 9/8/2024
0.0.2-alpha.0 191 9/6/2024
0.0.1 306 9/3/2024
0.0.0-alpha.0.216 192 9/3/2024
0.0.0-alpha.0.214 195 9/3/2024
0.0.0-alpha.0.213 87 9/3/2024
0.0.0-alpha.0.206 174 9/3/2024
0.0.0-alpha.0 78 9/3/2024