Btd6ModHelper.SourceGenerators 1.1.1

dotnet add package Btd6ModHelper.SourceGenerators --version 1.1.1
                    
NuGet\Install-Package Btd6ModHelper.SourceGenerators -Version 1.1.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="Btd6ModHelper.SourceGenerators" Version="1.1.1">
  <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="Btd6ModHelper.SourceGenerators" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Btd6ModHelper.SourceGenerators">
  <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 Btd6ModHelper.SourceGenerators --version 1.1.1
                    
#r "nuget: Btd6ModHelper.SourceGenerators, 1.1.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 Btd6ModHelper.SourceGenerators@1.1.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=Btd6ModHelper.SourceGenerators&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Btd6ModHelper.SourceGenerators&version=1.1.1
                    
Install as a Cake Tool

Btd6ModHelper.SourceGenerators

Source generators for BTD6 Mod Helper mods.

ModResources

Auto-generates a strongly-typed ModResources class so you can reference your embedded resources by name without typos and without writing string literals.

For every EmbeddedResource in your mod project with a known extension, a static readonly field is emitted on the ModResources class:

Extension Type
.png, .jpg SpriteResource<TMod>
.wav, .mp3, .ogg, .flac, .aac, .wma, .m4a AudioClipResource<TMod>
.bundle BundleResource<TMod>
.json JsonResource<TMod>

TMod is auto-detected as the concrete class in your project that inherits from BloonsMod.

If you have a series of numbered audio clips (pop1.wav, pop2.wav, pop3.wav, ...), a RandomizedAudioClipResource<TMod> named after the shared base (pop) is also generated — unless an audio clip with that exact base name already exists.

GitHub Actions workflow

If your project already has a .github/workflows/build.yml, the generator will keep that file in sync with values from your ModHelperData (currently PROJECT_NAME and DLL_NAME).

  • The generator only touches files that already exist — delete .github/workflows/build.yml to opt out for the project.
  • Opt out at the csproj level with <GenerateActionsWorkflow>false</GenerateActionsWorkflow>.

Opt out

Set <ModHelperSourceGenerators>false</ModHelperSourceGenerators> in your csproj to skip all generators.

Set <GenerateModResources>false</GenerateModResources> to skip just the ModResources generator.

Set <GenerateActionsWorkflow>false</GenerateActionsWorkflow> to skip just the workflow generator.

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.1.1 934 7/1/2026
1.1.0 567 6/12/2026
1.0.1 281 5/29/2026
1.0.0 144 5/29/2026