Scott Hanselman

AnkhSVN: Using Subversion within Visual Studio

August 18, 2006 Comment on this post [9] Posted in Musings | Tools
Sponsored By

Ankh1rc2Congrats to Arild for releasing AhknSVN RC2. If you're looking to use Subversion within Visual Studio, perhaps at work or perhaps you're working on an Open Source project at SourceForge, this is the tool for you.

NOTE: If you do use TortoiseSVN at the same time as Ankh, do note that they are linked to Subversion 1.4, so they will upgrade your local SVN working copies. Make sure you upgrade both at the same time.

To be clear:

IMPORTANT NOTE: TortoiseSVN 1.4.0-RC1 is linked with the Subversion 1.4.0-RC4 libraries. Due to various improvements made to the working copy library, the working copy format has changed. Using TortoiseSVN 1.4.0-rc1 on any working copy created by previous versions of Subversion/TSVN will TRANSPARENTLY upgrade your working copy, which means that production-ready versions of Subversion/TSVN (1.3.x and earlier) will no longer be able to read it! Please be careful, if you use other Subversion clients (eg. the 1.3.x command line client), not to use the TortoiseSVN 1.4.x release candidate on a production working copy.

As with all things, YMMV and back up your life.

ADDITIONAL NOTE: If you get "Unable to retrieve folder information from the server" when using VS2003 in a Web Project, you may need to go into your TortoiseSVN settings and set "use ASP.NET Hack" which tells Tortoise to use folders name "_svn" to store details rather than folders named ".svn".

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
August 18, 2006 6:34
Have you, or anyone else, had an experience with this plugin?

I plan on d/ling it and trying it next week when I'm at work.
August 18, 2006 10:15
I started using AhknSVN a month ago, but it just wasn't for me. I didn't like that the minute I added a file to my project, it did an 'Add' to SVN. I like to choose when to add myself.
August 18, 2006 11:42
Scott Elkin: Autoadding new files is an option, configurable in the configuration dialog. I used to feel the same way you did, but enough users wanted this behavior to be the default so I yielded.
August 18, 2006 23:12
I liked the last version, but love this one! Thanks, Scott, for announcing it here! Thanks Arlid for the MAJOR improvements! Speed of committing and updating prevented me from trying it any further. Now, I'll give it a full test!
August 20, 2006 3:12
You should check out PushOk's SVN SCC plugin ( It's $24 a licence but has very good support and is alot more stable than AnkhSVN. You can also try if for a month for free before purchasing.
August 20, 2006 8:40
Damien - I haven't found Ankh to be unstable at what are you referring?
August 20, 2006 13:59
Why is everytime i mentioned subversion, to -- especially VSS crowd , all they want is IDE integration. I'm sick of having too much in distraction while coding. Back in our place, we will not allow anksvn, tortoise or any visual client, it only make them lazy. up to the point that they don't even know what subversion has to offer, cause their brain we infected by vss virus.

with svn.exe , the posibily is endeless, we wrapped it inside our build with NAnt and for interactiveness they are always powershell and stuff.

here's one example for our
%lt;!-- invoke svn up, and examine the updated item if it contains table the rebuild database --%gt;
%lt;echo message="[Please examine these new files" append="false" file="st.log.txt"/%gt;
%lt;echo message="if you need it then add , else delete or ignore]" append="true" file="st.log.txt"/%gt;
%lt;echo message="" append="true" file="st.log.txt"/%gt;
%lt;exec program="svn" commandline="st" failonerror="true" output="" append="false"/%gt;
%lt;foreach item="Line" in ="" property ="newfile"%gt;
%lt;if test="${string::starts-with(newfile, '?')}"%gt;
%lt;property name="" value="true"/%gt;
%lt;echo message="${string::replace(newfile, '?', '')}" append="true" file="st.log.txt"/%gt;
%lt;if test="${}"%gt;
%lt;exec program="n" commandline="st.log.txt"/%gt;
%lt;exec program="cmdcolor" commandline='-c Red "Theres new uncommited file, ignore, delete or add"'/%gt;
%lt;fail message="There's new uncommited file, ignore, delete or add"/%gt;
August 24, 2006 7:56
I have a solution,which has a website,all other projects are added by ankh,but not website project..i had to manually add it.Is it so?
August 28, 2006 18:47
I have been a happy AnkhSVN user since I started to use VS.NET 2003 two years ago, and I have always been using TortoiseSVN on the side. I was already familiar with CVS and SVN before; I have never used VSS.

Frankly I don't understand erymuzuan's comment.
The nice thing about IDE integration, and hence about AnkhSVN, is that it is aware of the composition of your development solution: it knows which files belong to it and wich do not, and it also knows when one logical unit consists of multiple files (e.g. System.Windows.Forms.Control subclass, which has a code file and a resources file). Automatically adding a file to version control when it's added to a project or solution is exactly the behavior I want!

My main reason for still using TortoiseSVN on the side is that with the old AnkhSVN this abstraction doesn't work as well as I'd like. Renaming project items didn't rename them in SVN. I rename things quite often so I hope this is fixed in the latest AnkhSVN. I did try the current beta of AnkhSVN about a year ago but it crashed on me - I don't recall the details.

Another nice aspect of IDE integration is not having to switch to the explorer for everything related to version control. I very often use selective diffs, selective commits, and selective reverts; this is much more convenient from VS.NET's solution explorer than it is from the Windows explorer (my current solution consists of 19 projects).

So all in all, AnkhSVN saves me quite a bit of time each day. Great to see that it's still moving forward.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.