Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure 'Save on losing focus' in visual studio 2010

Is it possible either in the standard build or via a extension to make visual studio 2010 save all unsaved work when I switch focus to another application.

It's a feature that IntelliJ and TextMate do rather well (spot the Java developer learning C#) and it means I've gotten out of the habit of saving changes before I switch to the browser and hit refresh.

Note I'm not expecting real code to just work like this, I'm kinda hoping that changes to views and scripts can be saved on alt+tab

like image 541
Gareth Davis Avatar asked Oct 14 '10 10:10

Gareth Davis


People also ask

How do I set autoSave in Visual Studio?

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.


1 Answers

Someone made an add-in which does the job, go to http://cbates.net/document-autosave-for-visual-studio/

UPDATE:
Beware in VS2015 it seems that sln/csproj files are not being saved when focus is lost. This can cause some pain when you pull latest changes outside VS and forget to save project manually.

like image 63
Piotr Owsiak Avatar answered Oct 15 '22 02:10

Piotr Owsiak