Harmonize 1.0.5

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

Harmonize

NuGet Version GitHub License

Harmonize is a suite of design-time and compile-time tooling to simplify working with Harmony and HarmonyX. It provides IDE autocompletion for common parameter injections. It also analyzes your code for common usage mistakes to prevent errors at runtime and provides quick fixes to remedy them where possible.

Installing

Prerequisites

Harmonize requires the .NET 10 SDK. This means that, depending how you build your code, you will need one or more of the following to use Harmonize:

  • Visual Studio - 2026 (18.0) or later
  • JetBrains Rider - 2025.3 or later
  • Visual Studio Code or dotnet CLI - .NET SDK 10.0.100 or later

Package installation

Any of the methods outlined on the NuGet page should be sufficient in theory. In practice, it seems that adding the PackageReference directly to your csproj is the most bulletproof as dotnet add package will sometimes give a "the package does not contain any assembly references or content files that are compabible" error for reasons that are not very clear to me (if you know, feel free to tell share).

Features

Pending better documentation, here is a semi-comprehensive list of features currently supported by Harmonize.

Analyzers

Harmonize provides the following diagnostics, most of which also come with quick fixes to remedy them:

  • HARMONIZE001 - Errors when a patch method is underspecified (for example, does not define arguments for an overloaded method). This will produce an error at runtime.
  • HARMONIZE002 - Warns when any piece of data from patch attributes is defined multiple times in the same scope. This is undefined behavior, even if the attributes appear ordered. HarmonyX has one edge case where this warning can be ignored, which you can read about here.
  • HARMONIZE003 - Warns when a patch class is not annotated with [HarmonyPatch]. This will cause PatchAll to silently ignore the patch.
  • HARMONIZE004 - Warns when the type (Prefix, Postfix, Transpiler) of a patch method cannot be determined. If the method is not named or annotated appropriately, this will cause PatchAll to silently ignore the patch. If there are multiple patch types among the name/annotations this is undefined behavior. Static helper methods called from within the patch class are exempted from this rule.

Completions

Completions are not supported in Rider due to limitations of the JetBrains platform.

Harmonize provides the following completion providers:

  • Injections - Fully-typed injections for patch parameters when typing in a parameter list of an unambiguously-specified patch method. The simplest way to access them is by starting with _. The following injections are currently supported
    • __instance for instance methods
    • parameters of the patched method
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Harmonize:

Package Downloads
Silksong.FilteredLogs

Filtered Logs plugin for Silksong.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 802 1/2/2026
1.0.4 555 12/19/2025
1.0.3 608 12/13/2025
1.0.2 345 12/8/2025
1.0.1 277 12/7/2025
1.0.0 286 12/7/2025