Linkoid.LethalCompany.Plugin.Build 1.0.3

dotnet add package Linkoid.LethalCompany.Plugin.Build --version 1.0.3                
NuGet\Install-Package Linkoid.LethalCompany.Plugin.Build -Version 1.0.3                
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="Linkoid.LethalCompany.Plugin.Build" Version="1.0.3">
  <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.
paket add Linkoid.LethalCompany.Plugin.Build --version 1.0.3                
#r "nuget: Linkoid.LethalCompany.Plugin.Build, 1.0.3"                
#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.
// Install Linkoid.LethalCompany.Plugin.Build as a Cake Addin
#addin nuget:?package=Linkoid.LethalCompany.Plugin.Build&version=1.0.3

// Install Linkoid.LethalCompany.Plugin.Build as a Cake Tool
#tool nuget:?package=Linkoid.LethalCompany.Plugin.Build&version=1.0.3                

Lethal Company Plugin Build SDK

GitHub Stars License

Lethal Company Modding dotnet MSBuild

Provides MSBuild properties and targets for building and running a Lethal Company plugin.

Usage

To use this package, add a package reference to the project:

<PackageReference Include="Linkoid.LethalCompany.Common.Build" Version="*" PrivateAssets="all" />

Features

  • Automatically locates local Lethal Company installation with LethalCompany.Common.Build.
  • Built plugin is copied to the plugins folder of the target game.
  • Configures debug symbols to hide parent path and be compatible with mono.
  • The IDE's play button / dotnet run will start the game.
  • Does not bundle or transitively reference any assemblies.
    • Can easily be added to existing projects that already have their own references.
    • Can specify to reference local game assemblies if not using GameLibs packages.

MSBuild Properties

  • <PluginName>
    • The thunderstore safe name for the plugin.
    • Default: $(MSBuildProjectName) with common invalid characters removed
  • <StartGameOnRun>
    • Start the game when using play button or dotnet run.
    • Default: true
  • <EnableGameReferences>
    • Add game assembly references from the local game installation.
    • Default: false
  • <EnableUnityReferences>
    • Add Unity assembly references from the local game installation.
    • Default: use value of EnableGameReferences
  • <CopyFilesToPluginOutputDirectoryOnBuild>
    • Copy the plugin to the game's plugin folder after it's built.
    • Default: true
  • <CopyFilesToPluginOutputDirectoryOnRun>
    • Copy the plugin to the game's plugin folder right before the game is run.
    • Default: true
  • <PluginOutputSubdirectory>
    • The path relative to BepInEx/plugins/ to which the plugin will be copied.
    • Default: $(Authors)-$(PluginName) or $(PluginName)
  • See additional configurable properties inherited from LethalCompany.Common.Build.

MSBuild Item Metadata

CopyToPluginOutputDirectory

Anything copied to the build output directory will also be copied to the plugin output. It is possible to also specify items that aren't copied to the output directory to also be copied to plugin output.

<ItemGroup>
  <None Include="NOTICE.txt" CopyToPluginOutputDirectory="Always" />
</ItemGroup>

By default, the following files are copied to the plugin output if they are found:

  • README.md
  • README.txt
  • manifest.json

This behaviour can be overriden by explicitly specifying not to copy these files.

<ItemGroup>
  <None Update="README.txt" CopyToPluginOutputDirectory="Never" />
</ItemGroup>

Example

An example of using this SDK can be seen in the Plugin Build Test Project.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Linkoid.LethalCompany.Plugin.Build:

Package Downloads
Linkoid.LethalCompany.Test.Build

Provides MSBuild properties and targets for building and running a Lethal Company plugin.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 129 9/23/2024
1.0.2 124 9/22/2024
1.0.0 142 9/21/2024