Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recovering file from the Visual Studio document cache?

I've just lost some code. I needed to move a couple of methods from one class to another so i hit save, cut the methods and VS crashed. Now it seems that the save happened after the cut since the code has been saved without those methods but the code isn't on my clipboard. So I'm left without the code and no easy way to get it back!

I know that Visual Studio keeps a document cache which it uses when the recover files dialog is shown but it wasn't shown when VS started back up. I'm hoping that there is a version of my class with the code still in there so i don't have to start again but i don't know where to look.

Can anybody tell me where VS keeps these files on disk?

Really appreciate ANY help you can offer.

like image 565
EightyOne Unite Avatar asked May 22 '09 13:05

EightyOne Unite


People also ask

How do I recover files in Visual Studio?

You can also specify if you want to restore modified files if Visual Studio shuts down unexpectedly. To access this dialog box, go to Tools > Options > Environment > AutoRecover.

How do I recover an unsaved Visual Studio code?

Show extension side bar within VS Code(Mac: Command + Shift + X , Windows and Linux: Ctrl + Shift + X ), type unsaved-files-vscode and press Enter and click Install . Restart VS Code when installation is completed.

How do I recover a deleted project in Visual Studio?

To recover a deleted file or project: In Visual SourceSafe Explorer, on the File menu, click Properties. Click the Deleted Items tab. Select the file(s) or project that you want to recover. Click Recover.

Where is Visual Studio Recycle Bin code?

You can find recycle bin from project level: Boards - Work items and Artifacts using New Navigation(Account - Preview Features - New Navigation - on), See screenshot below.


2 Answers

Sorted it. Those recovery files are located @ MyDocuments\Visual Studio X\Backup Files\Project Name...

like image 59
EightyOne Unite Avatar answered Oct 08 '22 04:10

EightyOne Unite


Visual Studio 2019.4.1 had my backup files in %localappdata%\Microsoft\VisualStudio\BackupFiles - the folders in the MyDocuments tree were empty.

like image 35
CAD bloke Avatar answered Oct 08 '22 03:10

CAD bloke