MonoModReorg.Core 23.1.2-prerelease.1

This is a prerelease version of MonoModReorg.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MonoModReorg.Core --version 23.1.2-prerelease.1
NuGet\Install-Package MonoModReorg.Core -Version 23.1.2-prerelease.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="MonoModReorg.Core" Version="23.1.2-prerelease.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MonoModReorg.Core --version 23.1.2-prerelease.1
#r "nuget: MonoModReorg.Core, 23.1.2-prerelease.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.
// Install MonoModReorg.Core as a Cake Addin
#addin nuget:?package=MonoModReorg.Core&version=23.1.2-prerelease.1&prerelease

// Install MonoModReorg.Core as a Cake Tool
#tool nuget:?package=MonoModReorg.Core&version=23.1.2-prerelease.1&prerelease

THIS IS PROBABLY NOT THE LIBRARY YOU WANT TO BE USING. You probably want RuntimeDetour instead.

You have been warned.

Notable APIs

  • MonoMod.Core.DetourFactory.Current
  • MonoMod.Core.ICoreDetour


Use DetourFactory.Current.CreateDetour to create a single detour from one method to another. The detour will be automatically undone when the returnedc object is disposed or garbage collected. Only one such detour may be made per method. If multiple are made, they will not be cleaned up properly. MonoMod.Core does not track which methods have already been detoured, and will not throw.

It is therefore highly recommended to use a higher-level detouring API (like that provided by MonoMod.RuntimeDetour or Harmony) to perform detours. Those higher level APIs also provide solutions to many of the limitations to Core's detour abstraction, such as the ability to call the original, unmodified method, or modify the IL of the method. (See their documentation for how this is actually done.)

Other potentially useful APIs

The default IDetourFactory utilizes MonoMod.Core.Platforms.PlatformTriple.Current to implement detours. Notably, that factory handles re-creating the underlying ISimpleNativeDetour objects when methods are recompiled by the runtime.

PlatformTriple does provide a few other utilities which may be useful for a higher-level library, however:

  • PlatformTriple.Prepare JIT compiles a method, sully supporting generic instantiations
  • PlatformTriple.GetIdentifiable translates the provided MethodBase into an instance which can be used as, for instance, the key to a ConditionalWeakTable

The other methods of PlatformTriple are means of implementing the detour factory, and likely should not be touched.

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 was computed.  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)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MonoModReorg.Core:

Package Downloads

Flexible and easily extensible runtime detouring library. Wrap, replace and manipulate (Mono.Cecil) methods at runtime.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 7,961 3/23/2023 2,182 3/2/2023
23.1.2-prerelease.1 5,360 1/3/2023
22.11.21-prerelease.2 1,187 11/22/2022
22.11.21-prerelease.1 104 11/21/2022
22.11.17-prerelease.1 122 11/17/2022
22.11.9-prerelease.1 597 11/9/2022
22.11.8-prerelease.1 113 11/8/2022
22.11.8-prerelease 159 11/8/2022
22.11.4-prerelease 149 11/5/2022
22.10.25-prerelease 148 10/25/2022
22.10.21-prerelease 152 10/21/2022
22.10.11-prerelease 155 10/11/2022
22.10.6-prerelease 136 10/6/2022
22.9.29-prerelease 174 9/29/2022
22.9.23-prerelease 267 9/23/2022
22.9.14-prerelease 195 9/14/2022
22.9.7-prerelease 148 9/7/2022
22.8.29-prerelease 163 8/29/2022