How to transfer a project from ClearCase to TFS? - tfs

Excuse me for the novice question :blush:
How do I detach a project from ClearCase in order to add it to a TFS source control system?

The easiest way is to do whats called a "tip" migration. This just means grab a copy of your source code from ClearCase to your harddrive. Then add all the files to TFS. This will bring over the latest version of your code, but will not bring over the history.
If you want to do a migration that brings over history you will need to use a tool such as the TFS Integration Platform. The ALM Rangers have produced a connector for ClearCase and a bunch of training and videos on how to perform a migration that can be found here: http://blogs.msdn.com/b/willy-peter_schaub/archive/2011/07/27/getting-started-with-ibm-rational-to-team-foundation-server-tfs-migrations.aspx

I know it's silly but here's what I needed to do -
Open each of the csproj files
For each one, remove the xml nodes starting "Scc" (like SccProjectName, SccAuxPath, SccProvider etc) it seems they were the ones bothering the Visual Studio.
Reload the projects and add them to desired TFS workspace
Additional Steps that may need to be done:
Open the .sln with a texteditor and delete the entire section about source control.
In Visual Studio go to Extras -> Options... -> Sourcecontrol and change the plug in to TFS

Related

TFS not tracking changes if items added manually and not included into vs2015 solution

I've added a folder with asp.net core project which isn't supported by Visual Studio 2015 (which is used for everything else) and thus not included to the general solution.
To have those files in source control I had to manually add them using "add items to folder" command in source explorer. So they are checked-in but tfs not tracking changes for them anymore although there are differences that are shown if compare to the latest folder on the server:
How do I make TFS track them and show pending changes for edited files?
According to your description, looks like these files are all out side of Visual Studio.
Not sure if you are using server workspace or local workspace.
When adding or editing the workspace you click Advanced >> . There is a setting of Location: Local/Server.
For local workspace, when your script or anything else changes files outside Visual Studio, your workspace detects the changes automatically.
It also detects adds or deletes but you have to include them to your Pending Changes manually with the link under Excluded Changes.
For server workspace, you could choose to use Reconcile command. See https://stackoverflow.com/a/22860674/932282 for a complete answer.
Besides, you could also take a look at other solutions in below similar question:
How to have TFS 2010 detect changes done to files outside of Visual Studio?
Force TFS to detect changes
I think you just added them to source explorer and not to the solution, as you said. In this case, there is no editor application (even your VS) that is responsible for doing the check-out operation because they are not aware of TFS. On the other side, TFS can detect that changes have happened to the files but can not track them.
If you do not activate the "Get the latest version before check-out" option in your team project, then you can go to the source control and check-out those files manually and then check-in them manually again when your work with them is done.
Please before doing this, take a backup of your source code for caution.

How to copy a project from one TFS account to another?

I have a project under the TFS account provided by my company. I want to copy the project under my personal TFS account so that I can play with it and do some changes for learning.
How can I do this?
It totally depends on what you want to do.
Executing a complete migration can be hard. You need specialized tooling like the TFS Integration Tools.
Probably the easiest solution is to do a snapshot migration of your source code (where you lose all history). Migrating work items can be done by using Excel and some copy/paste work.
Currently there are no out of the box options for migrating build definitions (although the build workflows are part of source control), test results and release templates.
If possible, just migrate your source code and the work items if you have them.
UPDATE
If you only want to migrate source code without history you can do this by taking a copy of the source code from TFS and then checking it into your new TFS server. Have a look at Understanding TFS migrations from on-premises to Visual Studio Online – Part 2: Walkthrough for a walkthrough created by the ALM Rangers to help you with this.

Editing TFS2010 Build Definitions

We're currently setting up a number of builds in TFS2010 for our various projects/solutions.
We have a large number where the structure and paths, etc. are essentially the same, but one word may change (for example, using all Integration workspaces versus our Trunk workspaces).
In TFS2008, I would simply edit the XML directly and do some creative search and replace or some magic in textpad before saving the file. However, I do not see any immediate way of doing this in TFS2010 - so I'm stuck slogging through the build definition UI.
I know, in doing a SQL Trace, that all of this ends up as XML - so is there a way to directly access this XML for hand-editing vs. being forced to do all changes through the front-end?
Thanks!
Edit for additional clarity
I have the Power Tools installed, etc. and can clone my builds - but my editing options are still limited to the UI, so if I have a large number of workspace path changes I have to do them by hand (one at a time).
My goal is to be able to directly edit the XAML for a specific build definition so I can do a clone, open the XAML, and then do a search/replace in bulk.
Download and install the Team Foundation Server Power Tools. You can also get them through the Visual Studio Extension Gallery. After installing, you can right click on a Build Definition in Team Explorer and select the Clone Build Definition command (added by the Power Tools installation) to make a copy of an existing build definition. Then you can tweak it appropriately for another branch, etc.
The following tool (VS Addin) will satisfy your requirement>
Community TFS Build Manager
http://visualstudiogallery.msdn.microsoft.com/16bafc63-0f20-4cc3-8b67-4e25d150102c
The build definitions are all .xaml files now - they're WF4 workflows, and they're XML files.
Jim Lamb is right. The build templates are .xaml files now. The definitions are accessed through web services.
I'm about to experiment with a quick HTML form posting to /tfs/_tfs_resources/Build/V3.0/BuildService.asmx/QueryBuildDefinitionsByUri. I noticed when I clicked the build definition in Team Explorer that it has an associated URI: vstfs:///Build/Definition/2. Stay tuned.

How can I deliver code to TFS periodically?

I'm a consultant whose client runs a TFS 2005 repository. I manage my own source code in TFS and deliver my releases to their TFS. My source code is around 20,000 files that I maintain.
My normal process:
Detach my solution from my TFS
Connect to their TFS
Checkout the entire project
Overwrite my project files with
theirs
Check everything back in
Click the add button and add any new
files that have been added
Check everything in
Open the solution file and bind it
to TFS
Check everything back in
The main problem I'm seeing with this approach is if I delete a file on my end, I don't have a way to reflect that change.
I'm also not interested in synchronizing tools because I don't want to synch every checkin, just the current state.
Is there a way I can do this better?
What about maintaining parallel .sln and .proj files with the different bindings? Do they change often?
I think you can maintain change history by using the TFPT ONLINE command from the Team Foundation Power Tools.
Open SLN_A
Make changes (VS auto-checks out against TFS_A)
Before checkin on TFS_A, run TFPT ONLINE against TFS_B. This should pick up adds, edits, deletes.
Checkin SLN_A on TFS_A.
Checkin SLN_B on TFS_B.
Only problem with this might be that the SLN_A checkin could screw up the SLN_B pending changes b/c the files will be returned to read-only. Not sure.
Why do you need to maintain a parallel TFS? Seems like you ought to be working directly against their TFS, either on a branch, via the Proxy, or both.
Have you looked at TimelyMigration? (No affiliation and I've never had need to use it)
TFS to TFS migration

In TFS, once I have the build definition setup, how to I modify the task list etc?

I setup my build definition, is that all I do when it comes to setting up my build using the Team Explorer GUI?
It seems like the only thing for me to do now is edit the msbuild .proj file?
Is there a GUI for this or its all hand editing from here on it?
Currently there is no MSBuild editor inside Visual studio, but I've read that there gonna be one in Visual Studio Team System 2010 (one based on Workflow Foundation renderer).
If you really want a GUI you could try Microsoft Build Sidekick v2 but it is not free (55$) and not very useful in my opinion.
In TFS 2008 some of the information about a build can be edited through the GUI, but not much. If you right click on the build definition and choose Edit Build Definition you can change the workspace mappings, retention policy, drop location, and triggers. To change anything else you need to edit the .proj file.
What is it that you're trying to do? If you ask a specific question you might get interesting answers.

Resources