NOTE: The version of VSHistory compatible with Visual Studio 2022 can be found here.
Previous versions of VSHistory (including versions for VS 2017 and older VS 2019) can be found here.
VSHistory
VSHistory for Visual Studio saves a copy of your files every time you save them. They are stored in a special .vshistory
directory and can be opened or differences with the current file can be viewed.
A custom VSHistory tool window displays each version of project files as they're saved. Each version can either be viewed in a VS window or a difference between that version and the current file can be displayed.
Current File History
The history of the current file (the document that currently has focus) can be displayed from the menu via
View | Other Windows | Visual Studio File Histories
It is recommended that you dock the window somewhere, such as
You can see a diff of any version with the current file by clicking Diff
for that version in the VSHistory tool window. Clicking Open
will simply display that version of the file.
You can see the difference between two VS History files by checking the checkboxes of 2 history files.
VSHistory Settings
VSHistory settings allow the user to select how many versions should be maintained:
- Keep all versions
- Keep "n" versions
- Keep versions for "n" days/weeks/months
- Keep versions up to a maximum amount of disk space (but no less than 2 versions)
You can choose to have VSHistory files be compressed using GZIP compression when they are saved. This can save disk space if there are a lot of large files being saved in the VSHistory directories.
Location of VS History Files
By default, VS History files are maintained in subdirectories below the source files. You can optionally select an alternate location
for VS History files. This is especially useful when opening Visual Studio in Folder View.
NOTE: If the VS History files are maintained with the source files and you use a source control system like git, you may want to add the .vshistory
directory to be excluded in the .gitignore
file.
Excluding Files
All VS History Files
A display of all VS History files is available in settings:
Double-clicking a version will display a diff of that version with the current file.
Deleted Files
When a file is deleted, its file histories are kept. To view them, open All VS History Files
. The files that were deleted will have (deleted)
next to their name. Double-clicking a version will display that version.
You can add a tag to any history file by right-clicking on the timestamp in the "When Saved" column of the VSHistory toolbox.
The user-defined tags you've defined can be viewed in the "User-defined Tags" page of the VSHistory settings. You can also delete a tag on this page.
Revision History
- 3.2 Stability and performance update
- Improved performance
- Better tracking of the "current" document, especially if the VSHistory toolbox is not visible
- Minor bug fixes
- 3.1.5 Assorted fixes and improvements
- Added setting to select the file size threshold for GZIP compression
- Better support for color themes
- Localization of dates/times based on Visual Studio International Settings
- Minor cosmetic fixes
- 3.1.4 Fixed icon, added license, removed "Preview"
- 3.1.2 Cosmetic fix on Exclusions settings page
- 3.1.1 Fixed some cosmetic issues. Limit installation to Visual Studio 2019 16.9.11 and higher (but not Visual Studio 2022).
- 3.1.0 Add features and bring into sync with VSHistory 2022.
- Removed support for Visual Studio 2017
- Support displaying difference between 2 VS History files by selecting checkboxes
- Options to set the date format, including long, short and ISO formats
- Use standard built-in image monikers to accommodate different screen resolutions better
- "Modernized" the VSIX Project
- 2.4.2 Restored creating VSHistory directories as compressed.
- 2.4.1 Added option to determine whether large files are gzipped when saved.
- 2.4.0 Added support for excluding files. Fixed problem where All History Files were sometimes empty even though there were some VS History files.
- 2.3.0 VSHistory files are now gzipped to reduce storage and you can select any or all of the options to limit file versions. Previous (unzipped) version files are fully supported. Added some performance improvements.
- 2.2.2 Fix problem with "transparent" window; show deleted files in All History Files when in Folder view
- 2.2.1 Fix problem displaying All VS History Files when in Folder View
- 2.2.0 Added support for using an alternate directory for storing VS History files
- 2.1.0 Added support for user-defined tags. Fixed a problem with VS extensions that was introduced with the release version of .NET Framework 4.8 which caused the toolbox and settings pages to appear blank. Added support to adjust colors to different themes, like Dark Theme.
- 2.0.4 Added feature to view All History Files by date/time
- 2.0.3 Fix a problem where settings weren't getting save/restored properly
- 2.0.2 Initial release of VSHistory 2.0