views:

46

answers:

1

I had a little disaster: I did an "undo checkout" in my .aspx.vb file and lost all my work.

How can I recover my code?

Can I find it in the Temporary ASP.NET Files? If so, where? Is there any other VS2010 temporary files folder worth checking? A visual sourcesafe temporary folder?

+1  A: 

You can check on

c:\WINDOWS\Microsoft.NET\Framework\{Version of asp}\Temporary ASP.NET Files\

You can find there a compiled version of your file (if you did not compiled again). From this version you can recover easy your file by deleting some lines.

Also in this temporary dir, there are the DLL of the compilations, you can find the one you miss and is the page you lose, and open it with NetReflector - there you can get the code you miss with out any problem.

If you have vista, or windows 7, there is also the ShadowCopy, if it is enable you have some of the last versions of your file and you can get them by just see the properties of your file.

Aristos
Yeah... as soon as I realized my mistake I did NOT compile again and made a .ZIP archive version of this folder... but how will I recognize my file?
Lynx Kepler
@Lynx do you use TotalCommander ? if not start using it, there is a search inside files option there... and you can search for the function you lose.
Aristos
@Lynx I have update my answer, in that dir, there are also dlls, one of them is the one that have the code you looking for, and you can open and read it with NetReflector.
Aristos
I just did that! Opened the project DLL in the NetReflector and extracted my class. With a few minor alterations it was back in order again! Thank you!
Lynx Kepler