简体   繁体   中英

Recover files overwritten by generated code

I have a Winforms project that had a amongst others, 7 forms that I blindly named them with the same name that I named tables in my SQL server. Now I was trying to experiment with Entity Frameworks Data Model and visual studio generated classes for the tables in Database. For these 7 forms that class names were identical visual studio deleted all the code that I had in the forms. Is there any way to recover my old code. I have no usable backup!

I am sorry to say, but unless you have any backup there is no way to recover that files directly.

You could use ILSpy (or one of the other options in this blog article ) to disassemble the assembly you have once compiled. You will have at least something like what you had. (You will lose comments and other stuff)

Maybe slightly off-topic, but when you are lucky, you might find your files back with some disk recovery tools like GetDataBack from the company Runtime. I use it a lot myself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM