If you've try to get Il2CppDumper to run on MacOS before, more or less you've ran into this problem.
The Pre-built version that is available on Github only support NET6 and NET7 BUT GUESS WHAT, you can also get it to run with NET9 which is the latest version of Dotnet as well.
1. Install Dotnet if you haven't already
You can easily install Dotnet via Homebrew by running
2. Clone the whole repo from Github
cd into a directory of your choice
run git clone https://github.com/Perfare/Il2CppDumper.git
cd Il2CppDumper (cd into the folder you just cloned)
nano Il2CppDumper/Il2CppDumper.csproj (yes, there is another folder with the name il2CppDumper inside the main folder)
change this line <TargetFramework>net6.0</TargetFramework> into this <TargetFramework>net9.0</TargetFramework>
3. Build Il2CppDumper which supports NET9
After you've changed that, you need to run
dotnet clean Il2CppDumper.sln (in the case you've run the build before with the old dotnet, skip if you haven't)
run dotnet build Il2CppDumper.sln -c Release (if it still doesn't work, run this dotnet restore Il2CppDumper.sln)
After that you can run cd Il2CppDumper/bin/Release/net9.0/
4. Run the Il2CppDumper
After that you can run this command to dump your unity game
dotnet Il2CppDumper.dll /path/to/your/app.exe /path/to/global-metadata.dat output folder (replace the path base on your file path on your computer)
For example, dotnet Il2CppDumper.dll /path/to/your/app.exe /path/to/global-metadata.dat ~/Desktop/il2cpp_dump/
You can is IlSpy as an alternative for DnSpy on MacOS. You can load the Assembly.dll and so on.
I hope this would help those with the same problem
Credit to:
@Rakunera