Phil Scott
Phil Scott

Reputation: 21

How do I take an existing solution that has been using TortoiseSVN, and add it to TFS 2012?

I have a solution containing 4 projects in VS 2012. I have been using TortoiseSVN since the projects creation. I want to switch the source control over to TFS to view pending changes, check out versions, merge code, etc and make TFS my default source control client. I would be fine with losing all the solutions previous revisions because I can always manually copy old code if needed. Normally you right click on the solution and select, "Add solution to source control", but that option is not listed. I know TFS is configured correctly because I successfully added other projects to it from the same IDE on the same machine. There is also no "Source Control" option in the file menu. When I change the source control plugin from VisualSVN to Team Foundation Server VS closes my project. I have no experience with TFS, any help is appreciated.

Upvotes: 0

Views: 151

Answers (1)

David W.
David W.

Reputation: 107050

You want to move from Subversion to TFS? I hope they've made some substantial improvements in it since 2010. This survey matches my personal experience with TFS. TFS has a lot of good ideas in theory, but it is little beloved by developers.

Did you checkout your code in VisualStudio itself using Subversion? If so, you won't see the "Add Solution to Version Control" because it's already under version control. You'll have to export the code outside of VisualStudio using TortoiseSVN.

If you use TortoiseSVN to checkout the code, (instead of using export), there will be a _svn or .svn directory. If VisualStudio sees that, it may not allow you to add the solution file via version control either. You can remove that .svn or _svn directory to remove your working directory from version control, but that directory may be hidden if you're using Windows Explorer. Change your Windows Explorer preferences (at least temporarily) to see hidden directories.

Or bring up a command line console, use the cd command to change to the directory where your project is located, and then use dir /a to see all files and directories, including the hidden ones. You can use rd .svn /s/q to remove the .svn directory.

Why do you want to use TFS? It could be that you like TFS, or (more likely) ordered to use it. It could also be that you want an integrated source control system in VisualStudio. If it's the latter, you should look at AnkhSVN -- an open source (and free) Subversion plugin for VisualStudio.

AnkhSVN will allow you to do almost all Subversion operations from inside of VisualStudio and is a nice integrated solution. It won't checkin *.user files and other files and directories that shouldn't be checked into Subversion (like your obj directories). It's a great solution for VisualStudio projects.

Upvotes: 0

Related Questions