Reflector is out, try Ilspy.

Source: Internet
Author: User
Tags reflector sharpdevelop

Reflector is a must-have anti-compilation tool in. NET development. Even if it is not used in the anti-compilation realm, it is often used to check the naming conventions of assemblies, whether the namespaces are reasonable, and whether the methods of organization types need to be improved. For example, it has a feature that can see the full name of the assembly, see

The name here is the full identity that identifies an assembly, which is a unique distinguished name when there are multiple versions of the assembly in the GAC.

However, reflector a long time to pay for software, need to purchase permission to use. For a friend who is ashamed of using piracy, he usually gives up. Some friends said that reflector did not add more overbearing functions, but turned to charges, puzzling. And look at the market. NET Decompile software, was defeated by Reflector.

A mention of reflector, said. NET decompile, reflector is often the default preferred tool.

Here's a look at the monopoly of Visual Studio. Visual Studio occupies an absolute monopoly of the. NET Development tools family. In the. NET 1.x era, there are also C # builder,delphi.net to use and experience, competing high and low. Later, however, the. NET Framwork was updated frequently, and the changes were updated at the compiler level, and at the language level, which made the third-party software development tools very distressed, and these tools were slowly disappearing from the market, with few third-party software developers willing to develop. NET development tools compete with Visual Studio. Without competition, the pace of progress is much slower. Visual Studio 2008 is almost a replacement for Visual Studio 2005+SP, and at the tool level, Visual Studio 2005 SP1 adds a Web application, which is Visual Studio 2008. Although the language level is progressing a lot, the. NET 3.0,.net 3.5,linq, the framework method adds: WCF,WPF,WF, however, I've always known from 2005 to 2008, and it doesn't make much progress at the tool level.

SharpDevelop is the only alternative that can be selected except Visual Studio. NET open tools, and it is open source. It also provides pretty good functionality, almost rewriting visual Studio. In the latest version, support for Visual Studio's resolution bin files and project files has been added directly. Ilspy is the SharpDevelop team's anti-compilation tool, also open source, today to introduce its debugger and anti-compiler, so that the charges, but did not increase the overbearing function of the reflector out.

The Ilspy interface is similar to reflector, with the tree-shaped control on the left showing the assembly and its type, and the corresponding source code on the right. The basic anti-compilation function, compared with reflector, tittle, and sometimes reflector cannot decompile (because of the encryption) of the Assembly, with Ilspy can be deserialized.

Decompiler anti-Compiler

The basic type of anti-compilation features, and now only support the source code to decompile the C # and Il languages, does not support VB.

When the assembly that needs to be found is. NET Framework, you can open the assembly that needs to view the source code directly from the menu File-open from the GAC.

The code saving function is also good, when you click on a type, select File->save code will decompile the current type and save to the specified file, when the assembly is selected, save code is saved as a project (csproj) file, and all of its types are added to this project.

Debugger Debugger

The debugger here is not referring to the source-level debugger of Visual Studio, but to the debugger of the assembly. Reflector has a addin that can be attached directly to Visual Studio to debug a third-party type library without having to decompile the third-party type library and add it to the project as source code.

Ilspy also has this capability to debug third-party assemblies directly, with two options

If the third-party type library is an executable program (EXE), you can use the debug an executable to start the program.

If the third-party type library is an assembly (DLL), you can attach it with attach to running application to start debugging the assembly.

You can see how it's used in the two graphs above, just like debugging source code. Set breakpoints where you need to monitor the values of variables, and when the program runs to this point, you can watch the values of the variables by monitoring the form. As seen from the Ilspy status bar, the first picture above is in the debug state, and the second picture is ready to be debugged.

The difference between the two is that Attach to a running application debugging, if the code is optimized by the compiler, the monitor will not be able to get its value.

, the value of the variable num that is being debugged cannot be displayed because the code has been optimized. The official recommended way is debug an executable


As with debugging. NET source code in Visual Studio, you can Step Into,step over,continue, while the status bar displays ready (stand by), running (running), Debugging (Debugging).

In addition to debugging the C#/vb form of the assembly, you can debug in the form of IL code, as shown in

In this way, this is a pretty good tool for debugging IL code. Tools can promote the effect of learning, after learning to understand, but also to promote the development of tools, which is the endless development of knowledge.

Ilspy debugger is in the form of plug-ins, make sure to include the plugin of Ilspy.debugger.

According to our understanding, debugging. NET assembly is required to be a PDB file. However, Ilspy does not produce a PDB file (no PDB files are generated), and it cannot debug ASP. NET Web application and Web services.
The principle of this is not very clear. Compiler/debugger has always been my favorite technical subject, but learning is superficial and cannot be shared.

Reflector will detect that the system time exceeds its preset time, if not upgraded, it will actively delete itself, out of your computer. If you're upset about it, just let it out, you can have another choice, try Ilspy, and maybe bring a hint of surprise.

Reflector is out, try Ilspy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.