Migration Guide#
If you are migrating a mod from a <1.0.0 version KSP Build Tools, follow the instructions below
MSBuild Properties#
KSPRootwas renamed toKSPBT_GameRoot. It should no longer be referenced within a .csproj fileRepoRootPathwas renamed toKSPBT_ModRoot, and should now point to the mod folder within GameData rather than the root of a git repoBinariesOutputRelativePathwas renamed toKSPBT_ModPluginFolderGenerateKSPAssemblyAttributewas renamed toKSPBT_GenerateAssemblyAttributeand defaults to trueGenerateKSPAssemblyDependencyAttributeswas renamed toKSPBT_GenerateDependencyAttributesand defaults to trueReferenceUnityAssemblieswas renamed toKSPBT_ReferenceUnityAssembliesReferenceKSPAssemblieswas renamed toKSPBT_ReferenceGameAssemblies
MSBuild Items#
Dependency mods should now be specified with ModReference items. For example
<ItemGroup>
<Reference Include="0Harmony, Culture=neutral, PublicKeyToken=null">
<HintPath>$(KSPRoot)/GameData/000_Harmony/0Harmony.dll</HintPath>
<CKANIdentifier>Harmony2</CKANIdentifier>
<Private>False</Private>
</Reference>
</ItemGroup>
would become
<ItemGroup>
<ModReference Include="0Harmony">
<DLLPath>GameData/000_Harmony/0Harmony.dll</DLLPath>
<CKANIdentifier>Harmony2</CKANIdentifier>
<Private>False</Private>
</ModReference>
</ItemGroup>
CI Actions#
compile:#
The compile action no longer runs setup-dotnet. You need to run this step separately.
If your mod uses a packages.config file, you need to specify use-nuget-restore like so
- uses: KSPModdingLibs/KSPBuildTools/.github/actions/compile@1.0.0
with:
use-nuget-restore: 'true'
If your mod does not use a packages.config file, you can migrate your workflows on Github runners to use Ubuntu 24.04 or later.
assemble-release:#
The assemble release action no longer runs upload-artifact. You need to run this step separately.
Additionally, the artifact-path output was split into artifact-zip-path and artifact-dir-path containing paths to a zip file and directory respectively. Use the correct one depending on if you want a directory or a zip.
Library#
If you made use of the logging utilities under the KSPBuildTools namespace, you should migrate to KSPCommunityLib instead.