locked
How Do I Convert Compiled Projects to Source Code? RRS feed

  • Question

  • User-939035612 posted

    HP Recovery failed to backup my ASP.Net projects properly when doing a system restore and the live versions are all compiled. How do I de-compile them so that they are exactly as they were before?

    I tried a program called JustDecompile but that does not really de-compile them because they are still not in the original format. I need everything as it was in Visual Studio before being compiled.

    Lesson: If you have a HP computer always save your backups in a compressed format like .rar so that if your Windows installation is corrupted HP will backup your work. Apparently HP does not know to save files ending in things like .aspx or .cshtml

    Wednesday, May 13, 2020 5:11 AM

Answers

All replies

  • User1120430333 posted

    If you have lost the source code, then I see no resolution for you.

    Lesson: If you have a HP computer always save your backups in a compressed format like .rar so that if your Windows installation is corrupted HP will backup your work. Apparently HP does not know to save files ending in things like .aspx or .cshtml

    One should learn how to use a code repository like GitHub, TFS Express and others that are integrated with Visual Stuido. Code repositories that are free to install and use.

    Wednesday, May 13, 2020 5:34 AM
  • User-939035612 posted

    Give me a break man. I have never had a situation where I couldn't even login to Safe Mode. Then Microsoft system reset, which should have re-installed Windows without deleting any of my personal files, did not work either. I could only use HP auto-backup because their manual backup kept freezing. 

    That also does not answer the question of decompiling the apps.

    Wednesday, May 13, 2020 6:11 AM
  • User1120430333 posted

    Give me a break man. I have never had a situation where I couldn't even login to Safe Mode. Then Microsoft system reset, which should have re-installed Windows without deleting any of my personal files, did not work either. I could only use HP auto-backup because their manual backup kept freezing. 

    That also does not answer the question of decompiling the apps.

    Your stuff is lost unless you did a backup or used a code repository for source code like GitHub a cloud repository for source code.

    Other than that, there is no silver ballet or miracle that can help you that I know about that's going to take a binary executable and spit out some text source code.

    Wednesday, May 13, 2020 9:55 PM
  • User475983607 posted

    Try reflector.   It has a free trial period and can decompile to C# 7.

    https://www.red-gate.com/products/dotnet-development/reflector/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 13, 2020 10:07 PM
  • User-939035612 posted

    How is it that Visual Studio can take source code and spit out a binary executable but cannot take a binary executable and spit out source code?

    I have older versions of the websites from offsite backups, but they are months old and in one case missing most of the current features.

    Wednesday, May 13, 2020 11:35 PM
  • User-939035612 posted

    Thanks, I will try that. 

    Hopefully I can at least get all my classes so that rebuilding the pages wont be too hard.

    Wednesday, May 13, 2020 11:36 PM