How to get usercode from exe file

Ranorex Spy, Recorder, and Studio.
Ambarish
Posts: 1
Joined: Tue Feb 18, 2014 3:42 pm

How to get usercode from exe file

Post by Ambarish » Tue Feb 18, 2014 3:54 pm

the solution of one of my project got deleted. I only have the files which get generated after build in "bin/Debug" folder. These files are .exe, .exe.config, .pdb, .rxtmg and .rxtst. Can I get solution(.rxsln file) or UserCode.vb out of the above 5 files?
Please help me out of this.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to get usercode from exe file

Post by Support Team » Thu Feb 20, 2014 8:56 am

If the files are no longer in your Windows Recycle Bin and you don't use a version control system (or any other system to backup your data), then your chances are very low to get all your project files back.

So I would first check your Recycle Bin.
If you cannot find the files there, try some file recovery program (e.g. "Piriform Recuva") to recover your deleted files.

If that does not work, as a last resort you could use a .NET reflection tool (like redgate .NET Reflector) on the EXE file. Such reflection tools are able to generate source code out of a compiled exe/dll file. It won't be your exact code and won't have comments or documentation in it, but it might help to not loose all of your work.
However, if you have never used a reflection tool before, finding the right class to generate code from might be a bit complicated...

Regards and good luck,
Alex
Ranorex Team
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to get usercode from exe file

Post by krstcs » Thu Feb 20, 2014 2:35 pm

In addition to what Alex suggested, you should also look into getting a version control system for your test code. Subversion or TFS both integrate with Ranorex. I use GitHub. There are several free alternatives out there.

Remember that you are building software just like any other software project, so you must maintain control of your code just like any other software project.
Shortcuts usually aren't...