MonoMod.RuntimeDetour 25.1.0

dotnet add package MonoMod.RuntimeDetour --version 25.1.0
NuGet\Install-Package MonoMod.RuntimeDetour -Version 25.1.0
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="MonoMod.RuntimeDetour" Version="25.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MonoMod.RuntimeDetour --version 25.1.0
#r "nuget: MonoMod.RuntimeDetour, 25.1.0"
#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 MonoMod.RuntimeDetour as a Cake Addin
#addin nuget:?package=MonoMod.RuntimeDetour&version=25.1.0

// Install MonoMod.RuntimeDetour as a Cake Tool
#tool nuget:?package=MonoMod.RuntimeDetour&version=25.1.0

Notable APIs

  • MonoMod.RuntimeDetour.Hook - An easy-to-use method hook
  • MonoMod.RuntimeDetour.ILHook - Modifies the IL of a method
  • MonoMod.RuntiemDetour.DetourContext - Persistent, shared detour configuration

Basic Usage

// Create a Hook.
using (var d = new Hook(methodInfoFrom, methodInfoTo))
{
    // When the detour goes out-of-scope (and thus has Dispose() called), the detour is undone.
    // If the object is collected by the garbage collector, the detour is also undone.
}

Visit the GitHub and look for RuntimeDetour for more documentation.

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

NuGet packages (18)

Showing the top 5 NuGet packages that depend on MonoMod.RuntimeDetour:

Package Downloads
Rookout

Rookout is a .NET package that supports on the fly debugging and data extraction from .NET applications in production.

HarmonyX

A library for patching, replacing and decorating .NET and Mono methods during runtime powered by MonoMod.

MonoMod.RuntimeDetour.HookGen

Auto-generate hook helper .dlls, hook arbitrary methods via events: On.Namespace.Type.Method += YourHandlerHere;

OTAPI.Upcoming

The Open Terraria API, known as OTAPI, is a low-level API for Terraria that rewrites and hooks into the official or modded binaries for others to use. OTAPI is primarily a server modification and is available as a cross platform package via NuGet. Version 3.0 is now a .NET6 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET6. This means that any mod you create can be written as a .NET6 module and later merged into the patched assembly thanks to MonoMod. Here is what is now possible: - Native Runtime hooks, just reference OTAPI.Runtime.dll and register to MonoMod events generated from the Terraria assembly. - Full .NET6 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either. - A new optional internal module system via ModFramework to load precompiled dll's, .cs files or even top level classes. - A strong set of libraries with methods and extensions to help you build more mods. - Create 1 file MonoMod patches to rewrite or inject new meta data to the assembly.

OTAPI.Upcoming.tModLoader

The Open Terraria API, known as OTAPI, is a low-level API for Terraria that rewrites and hooks into the official or modded binaries for others to use. OTAPI is primarily a server modification and is available as a cross platform package via NuGet. Version 3.0 is now a .NET6 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET6. This means that any mod you create can be written as a .NET6 module and later merged into the patched assembly thanks to MonoMod. Here is what is now possible: - Native Runtime hooks, just reference OTAPI.Runtime.dll and register to MonoMod events generated from the Terraria assembly. - Full .NET6 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either. - A new optional internal module system via ModFramework to load precompiled dll's, .cs files or even top level classes. - A strong set of libraries with methods and extensions to help you build more mods. - Create 1 file MonoMod patches to rewrite or inject new meta data to the assembly.

GitHub repositories (11)

Showing the top 5 popular GitHub repositories that depend on MonoMod.RuntimeDetour:

Repository Stars
BepInEx/BepInEx
Unity / XNA game patcher and plugin framework
tModLoader/tModLoader
A mod to make and play Terraria mods. Supports Terraria 1.4 (and earlier) installations
LavaGang/MelonLoader
The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono
valheimPlus/ValheimPlus
A HarmonyX Mod aimed at improving the gameplay and quality of life of the game Valheim.
ManlyMarco/RuntimeUnityEditor
In-game inspector and debugging tools for applications made with Unity3D game engine
Version Downloads Last updated
25.1.0 1,721 2/6/2024
25.1.0-prerelease.2 1,450 1/8/2024
25.1.0-prerelease.1 1,047 12/7/2023
25.0.2 93,118 8/5/2023
25.0.0 2,946 6/16/2023
25.0.0-prerelease.2 126 5/25/2023
25.0.0-prerelease.1 86 5/20/2023
22.7.31.1 7,829 12/24/2022
22.5.1.1 125,291 5/1/2022
22.4.23.1 1,682 4/23/2022
22.3.23.4 128,640 3/23/2022
22.2.10.1 1,915 2/12/2022
22.1.29.1 14,516 2/2/2022
22.1.4.3 11,595 1/4/2022
21.12.13.1 49,399 12/14/2021
21.12.11.1 5,532 12/11/2021
21.11.9.2 5,680 12/8/2021
21.11.1.1 8,023 11/2/2021
21.10.10.1 7,237 10/10/2021
21.10.8.11 1,475 10/8/2021
21.9.19.1 3,154 9/19/2021
21.8.19.1 30,402 8/19/2021
21.8.5.1 12,895 8/5/2021
21.7.22.3 9,507 7/22/2021
21.7.8.3 10,887 7/9/2021
21.6.21.1 6,856 6/21/2021
21.4.29.1 9,643 5/6/2021
21.4.21.3 6,598 4/21/2021
21.4.2.3 4,770 4/3/2021
21.3.30.1 1,431 3/30/2021
21.3.28.2 1,680 3/28/2021
21.3.1.1 10,760 3/1/2021
21.1.11.1 40,230 1/12/2021
21.1.10.4 1,528 1/10/2021
20.12.25.1 1,788 12/25/2020
20.11.26.2 6,409 11/26/2020
20.11.16.1 2,611 11/16/2020
20.11.5.1 9,611 11/5/2020
20.8.28.1 1,598 11/5/2020
20.8.3.5 5,728 8/3/2020
20.5.21.5 6,845 5/23/2020
20.5.14.1 1,738 5/17/2020
20.5.7.1 4,534 5/7/2020
20.5.2.5 2,397 5/2/2020
20.4.3.1 1,827 4/3/2020
20.3.5.1 2,838 3/6/2020
20.3.1.1 1,618 3/1/2020
20.2.1.1 2,006 2/1/2020
20.1.1.4 3,774 1/1/2020
19.12.4.1 2,344 12/4/2019
19.11.5.1 2,066 11/5/2019
19.9.1.6 2,197 9/1/2019
19.8.2.3 1,937 8/2/2019
19.7.4.3 1,692 7/4/2019
19.6.9.5 1,784 6/9/2019
19.5.1.1 1,717 5/5/2019
19.4.10.9 1,772 4/10/2019
19.4.1.3 1,804 4/1/2019
19.2.7.8 1,970 2/7/2019
19.1.3.1 1,837 1/3/2019
18.12.9.1 1,815 12/18/2018
18.11.10.6 1,990 11/10/2018
18.11.9.9 1,664 11/9/2018
18.11.7.4 1,106 11/8/2018
18.11.4.19 1,127 11/4/2018
18.10.22.8 1,096 10/22/2018
18.10.0.37226 1,114 10/22/2018
18.10.0.35263 1,151 10/22/2018