Software Recommendations Asked by Ivaylo Slavov on September 25, 2021
Would you recommend a free tool for exploring compiled .NET assemblies. I need to be able to:
Optionally, I will be glad if it supports:
I used to work with .NET Reflector a few years ago and it supported most of the above features (actually all except the Xamarin integration). I tried to use it again a few weeks ago but now it has become a commercial product and my old free version does not work anymore.
ILSpy is one of the more popular FOSS .NET decompilers. It's pretty intuitive to use, though I have not yet tried Reflector so I can't compare them.
Unfortunately, it doesn't completely satisfy your requirements, though it gets close. There is no support for decompiling to C++/CLI, though it does work well for IL, C# and VB.NET.
You can click on class and method names to navigate to their definitions, or analyse them through the context menu for where they are accessed. It can render both images and text from embedded resources, and allows you to save them - I have not tried other filetypes, but they should work in the same way.
You can export classes to source files, and you can even export entire assemblies into .csproj
(MS build) files. For simpler projects these can be compiled directly. Many more complex projects tend to fail to compile without modification - notably, their site mentions it can't decompile and then recompile itself. If you need to decompile an entire assembly, you would likely have a lot of work left to get it to a compilable state.
Unfortunately, decompilation is not perfect. Some more complex language constructs, like C#'s dynamic
, are not yet supported and can result in somewhat garbled output. You can still get the general algorithm through the clutter, but it certainly wouldn't work if you just wanted to copy some code.
IDE integration. There was an early attempt for Visual Studio, though it appears to have been abandoned. There also doesn't seem to be any integration for Xamarin (when'd that happen?). However, the developers of ILSpy also created SharpDevelop, and recent news indicates they are planning SharpDevelop integration.
If you want other options, there's also dotPeek and JustDecompile. They do claim to have Visual Studio extensions, and might be more polished with some well-known companies behind them. I have not had a need to use either of them (ILSpy has worked for everything I needed), but they may suit your requirements better.
Correct answer by Bob on September 25, 2021
The answers here are good for the time the question has been asked. In the meanwhile, IMHO, dnSpy has outperformed them.
It also has other useful features:
I have used dotPeek before, but replaced that by dnSpy 2 years ago and I'm happy.
Answered by Thomas Weller on September 25, 2021
I personally am a big fan of dotPeek from Jetbrains as it ties in very nicely with Resharper and has some additional features to pull in .pdb:
Answered by ppittle on September 25, 2021
There is another tool developed by telerik - JustDecompile. It works really well, and has all the features of .NET Reflector and then some. (Including a visual studio extension). It's also free, which is nice. I've used it every since it came out and its quite nice.
One of my favorite features, is located under the tools menu "Create Project", it takes the assembly and build a csproj file out of it.
Answered by user23 on September 25, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP