Decompiling .NET Assemblies
By Scott Mitchell


Introduction
If you've created any ASP.NET Web applications before, and used Visual Studio .NET, then you're well aware that the entire set of ASP.NET code-behind classes specific to that application are compiled into a single DLL file, which resides in the Web application's /bin directory. This DLL file is referred to as an assembly. An assembly is the set of files that comprise an entire .NET application and, in the typical ASP.NET application example, can consist of one single file, or, in more complex situations, can consist of a number of files. The two germane parts of an assembly include:

When you compile a .NET application, the source code is translated into MSIL in a fairly straightforward manner. That is, there is a rough symmetry between a line of C# code, and the resulting MSIL. Since there is a rough mapping between high-level code and MSIL, it is possible to take an assembly's MSIL and convert it back to equivalent C# or VB.NET code. In fact, there are free programs that exist that do this very thing!

In this article we are going to examine one of these programs, Reflector. Using Reflector, you can examine the C# or VB.NET source code for ASP.NET applications, WinForms applications, and .NET class libraries. For example, using Reflector you can view the source code of the .NET Framework base class library, such as the classes that make up the built-in ASP.NET Web controls.

- continued -



Reflector for .NET

Reflector is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.

Reflector.zip - .NET Reflector, Version 4.2.50.0


Resourcer for .NET

Resourcer is an editor for .resources binaries and .resX XML file formats used with the .NET platform. The program allows the integration of bitmaps, icons and text strings into resource packages. Resourcer allows editing of name/string pairs, import of various kinds of data formats (bitmaps, icons, etc) and merging of resources from different sources.

Resourcer.zip - .NET Resourcer files