Skip to main content

Auto Save files in Visual Studio 2022

Earlier I posted about Temporary breakpoint – New feature in Visual Studio 2022, and in continuation with Visual Studio 2022 exploration, here is another new feature which will auto save files in Visual Studio 2022. This feature may come handy when you have to switch between different tools while working on your tasks. This would also ensure that your code is not out of sync, if the same files are opened in other tools along with Visual Studio.

Auto Save files in Visual Studio 2022

Visual Studio 2022 brings a new feature to save all your unsaved work automatically in the background, once the focus moves out of Visual Studio. This will include all unsaved files, be it your project files, solution files and any file which you have opened in VS and is not part of the project or solution. In case of Read-only files, Auto save won’t work and that’s expected. In case of any saving failure (may occur after all VS is also a software), the Visual studio will keep the your changes unsaved.

To enable it, Go to Tools -> Options -> Environment -> Documents -> Automatically save files when Visual Studio is in the background. (Please note, this is Visual Studio 2022 17.2.2 version.)

Auto Save files in Visual Studio 2022

How useful is this feature? Well, that choice would vary from developer to developer. Some may find it useful, while other’s may not. Personally, I don’t think I would enable this feature as I don’t want my unfinished code to get saved every now and then. After being in this industry for so long, Ctrl+S has become a habit .

Also, if you are using Code Cleanup on Save in Visual Studio 2022, then auto save will not trigger the code cleanup.

However, I would suggest not to enable this feature if you are on slow disks or working on remote machines as this could impact the machine performance as I/O operations are involved. So enable it wisely.

Thank you for reading. Keep visiting this blog and share this in your network. Please put your thoughts and feedback in the comments section.

PS: If you found this content valuable and want to return the favour, then Buy Me A Coffee

4 thoughts to “Auto Save files in Visual Studio 2022”

Leave a Reply

Your email address will not be published. Required fields are marked *