How to go back to the previous file before Visual Studio Automatically saved change - Visual Studio Community 2022

Lee,J 1 Reputation point
2022-10-01T00:05:13.93+00:00

I have pretty urgent question. My codes all worked fine but I accidentally closed the file after deleting something. I didn't even save it but visual studio automatically made a change. How can I go back to the previous file before I made any change? Is there any history of file I worked on like hourly or something?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,639 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
945 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
972 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,891 Reputation points Microsoft Vendor
    2022-10-03T03:47:54.647+00:00

    Hi @Lee,J ,

    Welcome to Microsoft Q&A!

    Please go to %LocalAppData%\Microsoft\VisualStudio\BackupFiles\[projectname] and check if there is a previous saved file.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments