Fody
Extensible tool for weaving .net assemblies (by Fody)
Harmony
A library for patching, replacing and decorating .NET and Mono methods during runtime (by pardeike)
Our great sponsors
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Fody
Posts with mentions or reviews of Fody.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-07.
-
Metalama.Compiler VS Fody - a user suggested alternative
2 projects | 7 Dec 2023
While Fody works at binary (MSIL) level, Metalama Compiler is a fork of Roslyn and allows for AST transformations, at the C# level.
-
Metalama VS Fody - a user suggested alternative
2 projects | 7 Dec 2023
-
C# Equivalent of Python Decorators
As an alternative to PostSharp you may take a look at Fody.
-
What does Realm.Fody do?
Working with IL weaving as part of the building process is quite complex though, and this is where Fody enters into the picture. Fody is an extensible tool that allows to simplify the weaving process by taking care of all the heavy lifting.
- Automated logging
-
Code generator like plop.js for dotnet
Fodyplugins can modify exists code during compilation.
-
What do think is the most advanced C# concept that most developers will never get?
I've seen coworkers using Fody for such MSIL weaving stuff, but I have a bad feeling about this. It's a little bit like jailbreaking your phone. Cool stuff ahead, but voids warranty.
-
EntityFramework installed in customers' GAC causing bugs in our software
Implement your own (in C++/outside dotnet/CLR) IHostAssemblyManager stuff, this is the "replace/bypass how assemblies are loaded" trick. There used to be a prebuilt thing on the old old codepages, but I can't find it. I wonder if newer code/assemblie weavers such as Fody can do the similar thing?
- Coding classes be like
-
Debugging hard to track transform changes. Can I pick your brains on tool design approach?
Great place to start is https://github.com/Fody/Fody and existing 'addins' - fody does it at compile time - generally quite useful for your own code if you want to dip into aspect oriented programming.
Harmony
Posts with mentions or reviews of Harmony.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-09.
- How to make mods?
- Learning how to mod
- [Gordianquest] Mod amplificateur de butin
-
Fast Script Reload - Hot Reload implementation for Unity is now open source!
Some more details https://github.com/pardeike/Harmony/issues/424
-
Set return value of method called by method in unit test
Here's what you're looking for.
-
Why use { get; set; } at all?
Probably a little out of your scope but the library Harmony you can write patches (detours) on methods. Using get/set instead of a field would allow you to override the property's method. Let's say you wanted to write something to always have the name uppercase. You could patch the constructor and set this.name = this.name.ToUpper() but that field is publicly assignable so you can't really enforce that. On the other hand with a property you can override the set method to say this._name = value.ToUpper().
-
Python's "Disappointing" Superpowers
It's kind of a subtle distinction that I think was lost between the posted article and the original article it was responding to, but I don't think the kinds of reflection capabilities that Roslyn provides is what the author intended. The specific example given in the referenced article for "Higher-order programs" specifically refers to the ability to replace function implementations at runtime without interrupting the program, and specifically calls out hot-code reloading (such as what Java provides) as a deficient form of similar functionality. This is closer to the type of functionality libraries like Harmony provide, but even that solution requires including the library and instrumenting your code ahead of time.
-
Reverse engineering integrity checks in Black Ops 3
https://github.com/pardeike/Harmony harmony lets you patch functions at runtime, kind of like a dll injection / memory edit
-
Loot amplifier mod
Download Harmony 2 and put net472 version of the library into GordianQuest_Data\Managed
-
Replace class method from DLL with my own
I'd recommend looking into Harmomy and seeing if you're able to use it. It makes modifying DLLs pretty convenient.
What are some alternatives?
When comparing Fody and Harmony you can also consider the following projects:
Mono.Cecil - Cecil is a library to inspect, modify and create .NET programs and libraries.
Aspect Injector - AOP framework for .NET (c#, vb, etc)
Extenject - Dependency Injection Framework for Unity3D [Moved to: https://github.com/modesttree/Zenject]
dnSpy
UnrealCLR - Unreal Engine .NET 6 integration
ILRepack - Open-source alternative to ILMerge
UniTask - Provides an efficient allocation free async/await integration for Unity.
NConcern - NConcern .NET AOP Framework
InjectFix - InjectFix is a hot-fix solution library for Unity
Gt.SubProcess - A library to run sub-processes on .net
mono - Mono open source ECMA CLI, C# and .NET implementation.