I wonder if total decompilation of arbitrary non packed project .NET is possible? If no, what is the conditions that should be met to make it possible? If yes, is there tools that can automate this? I'm wondering not about basic decompilers, but about the ability of complete project recovery to compile result with VS again.


Yet tried to apply only dotPeek for my case. Unfortunately the output is not looks like ready-to-go project but all errors seems to be debugable. Disadvantage is the inability to export both dlls and exe into one project automatically(poor man's editing .sln file required)


Seems like ILSpy has no option of export ready-to-go solutions for one/multiple .NET assemblies. Maybe there is some plugin/extension that should handle this? Will update this post if find one.

  • tip: .NET reflector + reflexil
    – rev
    Commented Feb 12, 2015 at 14:17
  • What's the end game for this? Are you trying to re-compile into a working .net binary after changes? If so, maybe there's a better way. Commented Feb 12, 2015 at 15:32
  • @baordog say I've working exe and bunch of dll written in .NET and I'd like to make a sort of fork of this project for personal use
    – see ya
    Commented Feb 12, 2015 at 20:40
  • You might have an easier time just modifying the binary. The decompiled "project" will be quite hard to interpret as it is, and there's no guarantee it will build properly. Commented Feb 12, 2015 at 20:51
  • @baordog well, I believe that binary modification is not way of writing the code. My question is about conditions that allows to get properly recovered project and the obstacles that will not allow me to solve this task. In other words about opportunities and limitations of existing tools/techniques.
    – see ya
    Commented Feb 12, 2015 at 21:25

4 Answers 4


JetBrains dotPeek is a free decompiler that has the option of decompiling whole assemblies into VS projects:

  • I've recently done this with dotPeek, which also decompiles submodules of the target project. After some tweaking I was able to recompile the project. Commented May 14, 2015 at 15:00
  • 1
    JustDecompile definitely generates better projects from my experience.
    – Mark Twain
    Commented May 6, 2016 at 6:54

Update: dnSpy is now my go to tool for .net decompiling. It's open-source, it exports to Visual Studio projects and the debugger works like a charm.


Original answer: Telerik JustDecompile also can export to Visual Studio projects. I used it recently and it worked with very minor modifications to the code. It's a free tool.


  • I tried it and it gave me all this weird uncompilable syntax, like foo.<Bar>Baz, foo.$this, etc, IIRC.
    – Sparkette
    Commented Oct 7, 2019 at 3:59

I wonder if total decompilation of arbitrary non packed project .NET is possible?

Tools like ILSpy do a great job with decompilation of arbitrary non-packed .NET binaries.

If yes, is there tools that can automate this?

ILSpy is open-source, so you can write your own code to automate the decompilation process.

  • Looks like the answer is actually "no" and this tool allows only write my own solution if needed.
    – see ya
    Commented Feb 12, 2015 at 13:58

Have you tried tools like:

For C#/VB

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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