Auto File Save Add-in for Visual Studio 6.0

This add-in adds an auto-save feature to Visual Studio. When invoked, a dialog box is opened in which the user can set a periodic save interval, and enable/disable automatic saving.

autosave dialog

Download

Current version: 1.04.0 (February 28, 2000)
You can download the Add-in and the source code separately:

Setup

Copy AutoSave.dll to any place you want. A good place would be under the Microsoft Visual Studio folder at Common\MSDev98\AddIns

Open Visual Studio and select: Tools | Customize…

Go to the Add-ins and Macro files tab and click on the Browse button.

Go to the folder to which you copied AutoSave.dll and select it. Make sure the Files of type listbox is on Add-ins (.dll).

When closing the dialog, a toolbar will appear with the Auto File Save button. Using the customize dialog you can move this button to any other toolbar (if you want to).

Press the button to setup the auto-save period and make sure you enable auto-save by selecting the checkbox.

Possible problems

These is a bug in Visual Studio 6 which causes it to lock up when the add-in starts saving while an IntelliSense Complete Word popup is being displayed. As a workaround, I set the focus to the desktop window and back again before saving. Because the auto complete popup is very sensitive to focus switches, it will be closed. When auto saving, Visual Studio blinks as a result of focus switching. If IntelliSense is enabled and you want to avoid these lockups, check the protection checkbox in the add-in’s dialog. If you are not using IntelliSense, uncheck it to avoid blinking. Thanks to Tadeusz Dracz for coming up with this workaround.

There is another known “feature”:
When working with source-safe IDE integration while the project (dsp and/or dsw files) is not checked out, but you have changed the project settings, the add-in will ask you to check out the project when it is attempting to save it. You can just cancel the request if you don’t want to check out, but this will happen periodically with the save. You can also disable saving the workspace and save only the files.

This add-in was built with Visual C++ 6.0 with service pack 3. I haven’t tested it with other versions, so you can take your chance. I heard from people that it works fine with DevStudio/Visual C++ 5.

If the add-in doesn’t “remember” its previous settings between Visual Studio sessions, check the registry for the following key:

HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0

This is where Visual Studio saves its data and where the add-in creates its sub-keys. If it doesn’t exist you may have a Visual Studio setup problems. If the key exists, it should have the following sub-key:

AddIns\AutoSave.DSAddIn.1

This is where the add-in saves its data. If the key doesn’t exist, create it manually and see if it works.

Version History

Version 1.04.0
Protect again lockups when saving while an IntelliSense popup is open. Added a checkbox to enable/disable this feature.

Version 1.03.1
Copyrights again. Someone is really threatened by this little freeware open source add-in. So now it has no name at all.

Version 1.03.0
Nothing serious. Someone claimed I violated his copyrights so I changed the name of this add-in from AutoSave to VsAutoSave.

Version 1.02.1
DllRegisterServer worked only when logged in as administrator. Now it will work in any case (thanks to Petr Smilauer).

Version 1.02.0
Separated saving the files and the workspace to two options. You can now configure the add-in to save only the files and leave the workspace or vice-versa.
The URL and e-mail fields in the about dialog are now active.

Version 1.01.0
Added about dialog with version and contact information.

Version 1.00.4
After installing, the auto saving is enabled by default.

Version 1.00.3
Fixed a big bug that prevented Visual Studio from terminating successfully.

Version 1.00.2
First release outside my small beta tester community.

Freeware

This software is free. It is distributed with the source code and you are encouraged to do anything you want with it. If you do anything interesting, I’d be happy to hear about it.