Restoring delete files with visual studio 2012

Files you delete in Visual Studio go to Windows recycle bin. Unless you cleared it, your files should still be there. Just restore them and than add them to your project as existing items. You can also drag and drop them through Solution Explorer.

EDIT:

You can also click the "Show All Files" button in solution explorer.

Highlighted: Show All Files button in Solution Explorer

The file will appear there, grayed out (if it was only removed from your project - not your disk drive). Then you can right-click it, and add it back to the ptoject. If it's not there try the first approach.


  1. Open folder/solution of the deleted items in 'Windows File Explorer'
  2. Press Ctrl+z (undo). This will instruct windows to undo the last actions on the folder
  3. Go to the Visual Studio solution again
  4. Click 'Show All files' icon on Solutions explorer
  5. Click Refresh
  6. Include the files again

PS. Its always safer to use a version control system, to make sure you can retrieve not just the file itself but any previously checked-in state. http://www.incredible-web.com/blog/revision-control-systems/