Decompile Precompiled Source Code ASP.NET

we have an application in production and the code is in Pre-Compiled form. The developer who developed that application left the company and we don’t have any backup of source code. the only access we have is Pre Compiled code in the server. We need to fix the issues in the application now.

Is there any way to Decompile (extract to actual source code) the PreCompiled code ?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Open the DLLs in the .NET Reflector.

Method 2

To update @xOn’s answer:

Due to a recent source control disaster I had to recover my project from the DLLs. So sadly I’m knowledgable on the procedure:

  1. Get .Net Reflector from here:
  2. You do not seem to need FileDisassembler.
  3. Either load your bins in Reflector or double click them.
  4. Mind that the .Net framework might have not maintained your original project file structure. So if some of your ASPX pages shared the same basic class name in different .cs files (I.E. Inherits tag is the same, but CodeFile tag differs), you would not be able to simply “export source code”.
    Don’t go blindly exporting source files. It won’t work.
  5. There will still be some work to be done before being able to just fire up the old build button. For example – DLLs can refer to property’s getter/setters directly. You will have to fix that.

Good luck.

Method 3

Start with:


You’ll have to recompile the latter to link it against v6.5 of reflector (the latest, as of this post.) It is a good add-on if you want to avoid having to copy and paste ever single class into files by hand. It will dump an entirely assembly as .cs files. I think it may even generate a csproj.

Both tools are free.

Method 4

I had the similar issue and used Reflector to Decompile it. I got the source code, then changed the bit I wanted, and rebuild it. Then I copied that dll again to Production site. It started to reflect my changes. It was very easy and not at all difficult, maybe because Precompiled site had dlls for every page, and was updatable , so had only code-behind file in dll.

For reference:

Method 5

When u install .net reflecter.its import in visual studio.
then you saw the .net reflector tools on menu bar.

Click on .net reflector >>Choose Asseblies (Dll file) to debug.

Method 6

I found that dll can be just Read using the .NET Reflector tool but can’t extract the Source Code. And also once the webforms are precompiled, we can’t even get back the code behind files. All we can do is to debug and analyze the Code.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x