Hack Forums
[C#] Decompiling executable into source code - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Decompiling executable into source code (/showthread.php?tid=5817675)



Decompiling executable into source code - Tʏʟᴇʀ - Mar 29, 2018

Hello,

First and foremost, I apologize if this is the wrong section. Feel free to report this thread to be moved to the correct section if needed.

Anyway, I am working on a project and looking to decompile my .exe into its source code. I tried JetBrains dotPeek and pulls what I am looking for, however when exporting it to a project, it imports compiler generated code into source code if that makes sense. I know what I am looking at when opened in Visual Studio so when I build the source, it returns a bunch of errors in which I found out it's compiler generated code that is causing the errors. So if I can just simply export the project without the extra codes being included, then I have what I need. I am not doing anything for malicious or illegal intent, this is all purely a project I am working on.

Does anyone know how I can go about doing this?

Thanks!


RE: Decompiling executable into source code - n0$f3ratu$ - Mar 29, 2018

(Mar 29, 2018 01:37 AM)Tʏʟᴇʀ Wrote:  Hello,

First and foremost, I apologize if this is the wrong section. Feel free to report this thread to be moved to the correct section if needed.

Anyway, I am working on a project and looking to decompile my .exe into its source code. I tried JetBrains dotPeek and pulls what I am looking for, however when exporting it to a project, it imports compiler generated code into source code if that makes sense. I know what I am looking at when opened in Visual Studio so when I build the source, it returns a bunch of errors in which I found out it's compiler generated code that is causing the errors. So if I can just simply export the project without the extra codes being included, then I have what I need. I am not doing anything for malicious or illegal intent, this is all purely a project I am working on.

Does anyone know how I can go about doing this?

Thanks!

In 99.9% of the cases you can remove the compiler generated code.
I recommend you to use either DNSpy which is the best or Telerik JustDecompile.

If you send me the executable I will put it in a project for you


RE: Decompiling executable into source code - 0xDEAD10CC - Mar 29, 2018

(Mar 29, 2018 01:54 AM)n0$f3ratu$ Wrote:  In 99.9% of the cases you can remove the compiler generated code.
I recommend you to use either DNSpy which is the best or Telerik JustDecompile.

If you send me the executable I will put it in a project for you

JustDecompile is discontinued, why would you use that? JetBrains DotPeek works really well for newer language versions too. DnSpy for it's other debugging and assembly modification features.


RE: Decompiling executable into source code - n0$f3ratu$ - Mar 29, 2018

(Mar 29, 2018 03:15 PM)0xDEAD10CC Wrote:  JustDecompile is discontinued, why would you use that? JetBrains DotPeek works really well for newer language versions too. DnSpy for it's other debugging and assembly modification features.

I am still getting updates for JustDecompile.
DotPeek is great but not the best.
True, DNSpy is great for debugging, but I am so used to it that I am using it for everything on daily basis.
Respect 0xDEAD10CC 🤝


RE: Decompiling executable into source code - 0xDEAD10CC - Mar 29, 2018

(Mar 29, 2018 07:05 PM)n0$f3ratu$ Wrote:  I am still getting updates for JustDecompile.
DotPeek is great but not the best.
True, DNSpy is great for debugging, but I am so used to it that I am using it for everything on daily basis.
Respect 0xDEAD10CC  🤝

Hmm, so I had to check my devcraft complete subscription for the downloads and I think I might've got mixed up with JustCode/JustTrace (discontinued) and JustDecompile which seems to be alive still.


RE: Decompiling executable into source code - Tʏʟᴇʀ - Mar 29, 2018

(Mar 29, 2018 01:54 AM)n0$f3ratu$ Wrote:  In 99.9% of the cases you can remove the compiler generated code.
I recommend you to use either DNSpy which is the best or Telerik JustDecompile.

If you send me the executable I will put it in a project for you

Thanks for the help. You did exactly what I was looking for! 🤝