visual-studiorecoveryfile-recovery

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.


Solution

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