Is there a Visual Studio equivalent to Eclipse's Local History? - visual-studio-2010

The Eclipse IDE has a nice feature that automatically logs file revisions and you can view them anytime by right-clicking on a file and clicking on Compare With -> Local History....
Is there an equivalent to this in Visual Studio 2010?

Some more updated options:
Every save is stored in a git repository. You can use existing git tools to look at the history:
autogit
This extension provides a custom local history viewer:
Local History for Visual Studio

Local History for Visual Studio is similar to Eclipse or IntelliJ's local history feature. It works with Visual Studio 2012 and 2013.

There is not natively in Visual Studio but what about Visual Local History. It has the option to 'Compare with last version'. It should work well for VS 2005, 2008 and with some extra configuration for 2010.

There is not an equivalent feature for local history.
However, if you're using TFS, there is support in the IDE for getting history of files (though this is commited/checked history).
Many other version control systems also have plugins for Visual studio which provide this type of functionality. For example, VisualHG provides an "HG History" command which shows the version history in the Mercurial repository.

For Visual Studio 2015, 2017, 2019 VSHistory extension: maintains the history of files in your Visual Studio projects every time they are saved. Any saved version can be viewed or a diff with the current version can be displayed

Related

Installation of AnkhSVN Visual Studio 2019

I can not Install AnkhSVN -Subversion Support for Visual Studio 2019,
I have tried to Install It, It says Version is Invalid for VS2019
I use VS2019 Professional
I have made a fork of the AnkhSVN project and published a version on Visual Studio Marketplace as AnkhSVN2019.
This version targets only Visual Studio 2019.
The page on the Visual Studio Marketplace is here:
https://marketplace.visualstudio.com/items?itemName=PhilJollans.AnkhSVN2019
You can also find it by searching the Visual Studio Marketplace in Visual Studio.
The project is on GitHub here:
https://github.com/PhilJollans/AnkhSVN2019
As far as I can tell it is working correctly, but that is based on a small number of systems, and I only use a subset of the features.
Support for Visual Studio 2022
My fork of AnkhSVN does not support Visual Studio 2022, but there is a version in the GitHub repository from the original developers of AnkhSVN.
As of 4-December-2021, this version is not available in the Visual Studio Marketplace, but you can download the package from the releases page on GitHub.
As of 4-December-2021, the download link for the current version is
https://github.com/AmpScm/AnkhSVN/releases/download/v2.9.87/Ankh-VSIX-2022.zip,
but there may now be a newer version.
The latest AnkhSVN version is not compatible with Visual Studio 2019 (and the project, unfortunately, seems dead).
A possible solution is to edit manually the files stored in the vsix file (it's a zip file with a different extension).
The file to edit are:
extension.vsixmanifest
Change the occurance of [15.0,16.0) to [15.0,17.0)
Change the prerequisite in this way:
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
catalog.json
search Microsoft.VisualStudio.Component.CoreEditor and change the version to "[15.0,)"
manifest.json
search Microsoft.VisualStudio.Component.CoreEditor and change the version to "[15.0,)" as the catalog.json
After these changes it's possible to install the extension in VS2019 but still open a warning shown by VS related an incompatibility of the load process (AnkhSVN use a synchronous load, VS2019 want an async load).
Looks like it doesn't support VS2019 by default. https://ankhsvn.open.collab.net/
But you can try to update extension for VS2019.
Rename vsix to zip
Unzip
Open extension.vsixmanifest, manifest.json and catalog.json and for Microsoft.VisualStudio.Component.CoreEditor change version to [15.0,)
Open extension.vsixmanifest and also replace all [15.0,16.0) by
[15.0,17.0)
Zip all files
Rename to vsix
The original AnkhSVN project developed by CollabNet is now abandoned and does not support Visual Studio 2019 now (the project is inactive for more than 17 months). As an alternative, consider migrating to VisualSVN that is now completely free for use on non-domain computers (no registration required) and provides about the same functionality compared with AnkhSVN (some users consider VisualSVN to be better for their use cases).
Migrating from AnkhSVN to VisualSVN is a straightforward process. The most recent VisualSVN 7.1 and VisualSVN 6.5 releases add support for multiple working copies within a single solution, and this makes the migration practically instant and painless for almost all users. See the article KB58: Migrating from AnkhSVN to VisualSVN for instructions and the article KB7: Using Multiple Working Copies in VisualSVN if your solution projects span across multiple working copies.
Note that the workarounds suggested in the accepted answer may cause overall Visual Studio destabilization and do not make AnkhSVN compatible with Visual Studio 2019. See the comments under these answers:
https://stackoverflow.com/a/55533335/761095
https://stackoverflow.com/a/55533472/761095
BTW, according to this post, those hacky workarounds do not work anymore.
DISCLAIMER: I am a support engineer with VisualSVN Team.
I've just installed AnkhSVN 2.8.12824 via "Manage Extensions". It seems to work, though Visual Studio 2019 complains that it might not be compatible with a future Visual Studio update (Deprecated APIs).
See also
https://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=582&dsMessageId=647485
Possibly also
https://learn.microsoft.com/en-us/visualstudio/extensibility/synchronously-autoloaded-extensions?view=vs-2019
AnkhSVN supports Visual Studio 2019 now. Download here https://marketplace.visualstudio.com/items?itemName=simonp.AnkhSVN-SupportVS2019 [broken link]
Seems to still be active on GitHub: github.com/simonp22/AnkhSVN
The owner removed the program from the marketplace until he works out the async loading in the code, according to a comment from him in the github project
https://github.com/simonp22/AnkhSVN

TFS Windows Explorer Integration - Getting version history outside of VS

I worked for year using CVS source control with Windows Explorer integration using TortoiseCVS which enabled me to view the history of my files in a graphical way and allow me to compare any 2 versions of the file without the need to open IDEs.
Lately I started working in a new place that uses TFS which require me to open Visual Studio every time I want to see the file history.
It would be great to have this level of integration between TFS and Windows Explorer. I wonder if any third party has developed such functionality?
Currently I use C# with Visual Studio 2013.
This is what I see when I choose Revision Graph:
Shell integration can be installed as part of the Visual Studio Power Tools for Team Foundation Server 2013. Make sure you check the "Windows Shell Extensions" option.
To see the revision graph, I am afraid you still need to open Visual Studio and use the Track Changeset feature which seems the closest as far as I can tell.
That and the "Incoming Changes" codelens that was added to Visual Studio 2013 Ultimate and which is going to be part of Visual Studio 2015 Professional and up.

visual studio 2010 doesn't remember ankkhsvn as being used as source control

I am using ankkhsvn (selected as an option in tools) in visual studio 2010 and when I restart my machine the project reverts back to Team foundation as the selected source control.
Any ideas?
Right click solution, add to subversion. confirm that you want to manage the .sln with subversion.
This adds a few lines to your .sln that enable AnkhSVN if it is installed (or are ignored if AnkhSVN isn't installed).

How to add SVN to Visual Studio 2012?

I was using Visual Studio 2010 previously, with visual SVN as the source control. Now that I've upgraded to Visual Studio 2012, I'm facing problem of adding SVN as the source control (to VS 2012). By default only Team Foundation is there. Any help with how to add SVN as the source control to Visual Studio 2012 would be really appreciated.
VisualSVN 3.0 supports Visual Studio 2012. You can get it at the download page.
Except VS2012 support and a couple of usability and UI improvements VisualSVN 3.0 introduces the new Community License that allows to use VisualSVN for free on non-domain machines (moreover it permits commercial use!). See the VisualSVN 3.0 Release Notes.
In VS2012 just go to Tools/Options/Source control and in dropdown "Current source control plug-in" select the needed one (if you already have it installed)
Run the Visual SVN installer again and select 'Modify'
Tick the box that say 'Integration Visual Studio 2012'
and then continue with the installation. Restart VS 2012 and you will see VISUAL SVN on the TOP menu
We use AnkhSVN for VS2012 and lower versions.
Most likely you're using old version of VisualSVN that doesn't support VS2012. Try to install latest VisualSVN 3.0 for Visual Studio 2012 support.
Currently I am using VisualSVN-5.1.4, but I have done this with previous versions.
Re-run the installer.
Select "Modify", then Next to move to the "Custom Setup" pane.
A checkbox list of the installed Visual Studio (VS) versions will appear.
Check to VS('s) that apply.
Open the targeted VS.
Open the "Tools>Options" dialog and select Source Control
Select "VisualSVN" from the "Current source control plug-in" combo box.
I first took the "Repair" option but that did not put VisualSVN in the Source Control options list. It didn't hurt but it didn't help, either.
Yo need to run the installer of subversion again and repair the installation.
The installer will register the application in the VS2012 version too.
We had the same problem with it.
What you really need to do is go to Tools -> Options
In the dialog scroll down to Source Control -> plug-in-selections.
There is a drop down that has a list of source controls and you select your SVN controller there (Ankh, Visual, whatever one you want).
This is the same for 2012, 2013 and 2015
Re-run the installer , and during the setup, choose the versions of Visual Studio you want to be available.

TFS Workspaces across VS 2010 and 2012?

I am currently developing on Visual Studio 2012 RC using TFS Preview for source control. I would like to create an SSIS Integration project, which requires me to use Visual Studio 2010. However, when I connect to TFS from VS 2010, it automatically creates a new workspace and does not list the VS 2012 workspace.
If I issue the tf workspaces command from the VS 2010 command prompt, I see only the VS 2010 workspace, and if I issue the command from the VS 2012 command prompt, I see only the VS 2012 workspace (both indicate the same colleciton is being used).
Is there some way I can get VS 2010 to see the VS 2012 workspace? I would prefer not to have to have two copies of source code just to be able to use VS 2010 for the SSIS project.
TFS 2012 introduces a new concept called local workspaces, which differ subtly from the behavior of workspaces in previous versions of TFS (the old default behavior is now called a server workspace.) Local workspaces do not require read-only files and instead allow files to be edited without checking out from the server, and they are intended to be more suitable for small to medium sized workspaces. For this reason, local workspaces are the default in TFS 2012.
Local workspaces, however, are not compatible with TFS 2010 and TFS 2010 clients will not be able to use a new local workspace.
You can convert the workspace that you created with your VS 2012 client to a server workspace. In the Edit Workspace dialog, select Advanced, and you can change the type from a Local to a Server workspace.
At that point, you should be able to connect with VS 2010 and choose that TFS workspace.
(Note that it's not sufficient to use tf workspaces as that will return a cached copy of your workspace list - you will need to connect to the server either with Visual Studio 2010 or with a tf.exe command that talks to the server.)
In addition to the Location="Server" property mentioned in other answers/comments, the File Time property must be "Current", as shown below.
Workspaces created in Visual Studio 2012/2013 with either Location="Local" or File Time="Checkin" are not visible/usable in Visual Studio 2010.

Resources