VOOZH about

URL: https://www.nuget.org/packages/Lib.Harmony.Ref/

⇱ NuGet Gallery | Lib.Harmony.Ref 2.4.2




👁 Image
Lib.Harmony.Ref 2.4.2

dotnet add package Lib.Harmony.Ref --version 2.4.2
 
 
NuGet\Install-Package Lib.Harmony.Ref -Version 2.4.2
 
 
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="Lib.Harmony.Ref" Version="2.4.2" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lib.Harmony.Ref" Version="2.4.2" />
 
Directory.Packages.props
<PackageReference Include="Lib.Harmony.Ref" />
 
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 Lib.Harmony.Ref --version 2.4.2
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lib.Harmony.Ref, 2.4.2"
 
 
#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 Lib.Harmony.Ref@2.4.2
 
 
#: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=Lib.Harmony.Ref&version=2.4.2
 
Install as a Cake Addin
#tool nuget:?package=Lib.Harmony.Ref&version=2.4.2
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

<p align="center"> <img src="https://raw.githubusercontent.com/pardeike/Harmony/master/HarmonyLogo.png" alt="Harmony" width="180" /><br> <b>Version 2.4</b><br> A library for patching, replacing and decorating<br> .NET and Mono methods during runtime. </p>

About

Harmony gives you an elegant and high level way to alter the functionality in applications written in C#. It works great in games and is well established in titles like

RustRimworld7 Days To DieStardew ValleySubnauticaOxygen Not IncludedBesiegeCities:SkylinesKerbal Space ProgramResoniteBattleTechSlime Rancher

and others like Ravenfield, Sheltered, Staxel, The Ultimate Nerd Game, Total Miner, Unturned, SCP: Secret Laboratory ...

It is also used in unit testing WPF controls at Microsoft and Google and in many other areas.

How it works

If you develop in C# and your code is loaded as a module/plugin into a host application, you can use Harmony to alter the functionality of all the available assemblies of that application. Where other patch libraries simply allow you to replace the original method, Harmony goes one step further and gives you:

• A way to keep the original method intact • Execute your code before and/or after the original method • Modify the original with IL code processors • Multiple Harmony patches co-exist and don't conflict with each other • Works at runtime and does not touch any files

Installation

If you want a single file, dependency-merged assembly, you should use the Lib.Harmony nuget package. This is the preferred way.

If you instead want to supply the dependencies yourself, you should use the Lib.Harmony.Thin nuget package. You get more control but you are responsible to make all references available at runtime.

Documentation

Please check out the documentation and join the official discord server.

Contribute

I put thousands of hours into this project and its support. So every little action helps:

• Become a GitHub sponsor or a Patreon • Upvote this stackoverflow answer • Spread the word in your developer communities

This project uses the great MonoMod.Core library by 0x0ade and nike4613.

Harmony 1

Harmony 1 is deprecated and not under active development anymore. The latest version of it (v1.2.0.1) is stable and contains only minor bugs. Keep using it if you are in an environment that exclusively uses Harmony 1. Currently Harmony 1.x and 2.x are NOT COMPATIBLE with each other and SHOULD NOT BE MIXED. The old documentation can still be found at the Wiki.

<br> 

<p align="center"> <a href="../../blob/master/LICENSE"><img src="https://img.shields.io/github/license/pardeike/harmony.svg?style=flat-squared&label=License" /></a> <a href="../../releases/latest"><img src="https://img.shields.io/github/release/pardeike/harmony.svg?style=flat-squared&label=Release" /></a> <a href="https://harmony.pardeike.net"><img src="https://img.shields.io/badge/documentation-%F0%9F%94%8D-9cf?style=flat-squared&label=Documentation" /></a> </p> <p align="center"> <a href="https://github.com/pardeike/Harmony/releases/latest"><img src="https://img.shields.io/github/downloads/pardeike/Harmony/total.svg?style=flat-squared&logo=github&color=009900&label=Release%20Downloads" /></a> <a href="https://www.nuget.org/packages/Lib.Harmony"><img src="https://img.shields.io/nuget/dt/Lib.Harmony?style=flat-squared&logo=nuget&label=Nuget%20Downloads&color=009900" /></a> </p> <p align="center"> <a href="https://github.com/pardeike/Harmony/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/pardeike/Harmony/test.yml?style=flat-squared&logo=github&label=CI%20Tests" /></a> <a href="https://discord.gg/xXgghXR"><img src="https://img.shields.io/discord/131466550938042369.svg?style=flat-squared&logo=discord&label=Official%20Discord" /></a> </p> <p align="center"> <a href="mailto:andreas@pardeike.net"><img src="https://img.shields.io/badge/email-andreas@pardeike.net-blue.svg?style=flat-squared&label=Email" /></a> <a href="https://twitter.com/pardeike"><img src="https://img.shields.io/badge/twitter-@pardeike-blue.svg?style=flat-squared&logo=twitter&label=Twitter" /></a> </p>

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Lib.Harmony.Ref:

Package Downloads
Lib.Harmony

A general non-destructive patch library for .NET and Mono modules.

Lib.Harmony.Thin

A general non-destructive patch library for .NET and Mono modules.

PLib

PLib - Peter Han's library used for creating mods for Oxygen Not Included, a simulation game by Klei Entertainment. Contains methods aimed at improving cross-mod compatibility, in-game user interfaces, and game-wide functions such as Actions and Lighting. An easy-to-use Mod Options menu is also included.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Lib.Harmony.Ref:

Repository Stars
peterhaneve/ONIMods
Peter Han's mods for Oxygen Not Included
Version Downloads Last Updated
2.4.2 14,019 11/13/2025
2.4.1 4,704 8/22/2025
2.4.0 747 8/17/2025
2.3.6 12,438 4/16/2025
2.3.5 7,425 2/6/2025
2.3.4 618 2/5/2025
2.3.3 130,521 3/29/2024