7

It this even possible? Are there any free tools?

  • I did, but after i build the project and run the .exe with mono, i get an error. I get this: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. I may debug the project in the future to find the issue if no easier solution will arise till then. :) – Tadej May 15 '17 at 18:43
  • It depends on the complexity of the original executable, but in general debugger is the way to solve the problem. – PhoeniX May 15 '17 at 18:49
5

Best free tool for the job is ILSpy, but it runs on Windows. This gives you a limited list of options:

  1. create a windows virtual machine (with virtualbox or vmware player) and run it in there

  2. install WINE on mac, to allow you run .exe files.

  3. get visual studio for mac and use ikdasm

  4. if you feel hardcore, open it in a disassembler ;)

Being an IT guy myself, I would go for the first solution. Check them all out briefly and go for one!

| improve this answer | |
  • 2
    for point 3, there's no tool called ildasm. The tools that are included VS for Mac are called ikdasm or monodis – Paweł Łukasik May 21 '17 at 5:44
  • Thnks for the notice! I corected it. – Chris Tsiakoulas May 21 '17 at 8:23
5

Visual Studio for Mac can do the job. Just hit File / Open and then choose the executable or library you want. It'll open the Assembly Browser window.

If you need more detailed code change the Visibility to All members and the Language to C#.

Visibility

Language

decompiled

| improve this answer | |
  • but this way doesn't give you the code. Only the signatures of the methods. – Paweł Łukasik Feb 13 '19 at 21:39
  • @PawełŁukasik yes you can do, just take a look at my updated post. – Gandarez Feb 14 '19 at 22:20
  • Yup. My mistake. – Paweł Łukasik Feb 14 '19 at 22:24
1

You can use Jetbrains' Rider. It has a 30 day free trial period.

  1. Open Rider and open or create a C# project
  2. Add a dependency to the .exe file (naturally, this also works for .dll).

enter image description here

  1. In a class in your project, import the package and type the class you want to inspect.

enter image description here

  1. Do Command+click or Command+B on the class name to trigger Rider's decompile option. Confirm if necessary.

The disadvantage is that we have to repeat step 4 for each class we want to decompile.

| improve this answer | |
  • 2
    it looks like you were too fast. Point 4 is incomplete and 5 is missing. – Paweł Łukasik Mar 13 '18 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.