I was pleasantly surprised this week when I dived into TFS Online to tweak some queries and stumbled upon the new @CurrentIteration token that can be used.
This token can potentially solve the administration overhead associated with getting consistent reports out of TFS from sprint to sprint.
In the past I have had a series of TFS Queries to track the progress of things happening within the sprint such as:
- Outstanding Product Backlog Items (with associated outstanding child work items shown in tree view)
- Outstanding Product Backlog Items (flat list)
- Done Product Backlog Items
The problem with these queries was that each of the queries has to conditional match a specific sprint (iteration)
The new @CurrentIteration token can be used to dynamically work out what the current iteration (sprint) is so that you don’t have to manually update all the queries when the sprint changes.
Here’s a post from Microsoft regarding the new @CurrentIteration token when it shipped.
This is a great step forward and probably should have been there a long time ago.
One not so nice thing I’ve discovered with using the @CurrentIteration token in queries is that Excel 2013 fails to open any query that uses the @CurrentIteration token and gives the error message:
“TF80076: The data in the work item is not valid or you do not have permissions to modify the data. Correct the problem and retry.”
How to fix issue with opening Visual Studio solution from tfspreview.com by moving it to visualstudio.com
This problem arises if you were using Team Foundation Services (TFS) Online while it was still in preview. You will be accessing TFS on a URL such as: https://mycompany.tfspreview.com A recent change has been made to TFS Online that prevents you opening solutions using this URL. When you try to open an existing solution (that you have already synced down to your development machine ) you will see the following error message in Visual Studio:
Attempting to “Go Online” with the solution, or disconnect from TFS and reconnect using the same tfspreview.com address will result in a security credentials prompt that accepts your credentials but just sits there blank. BTW trying to login to the tfspreview.com URL in IE also results in this blank page behavior, in Chrome it gives a slightly better redirect error.
What Microsoft want you to use instead is the visualstudio.com address instead: https://mycompany.visualstudio.com.
This is simple if you just want to access TFS in a browser. Simply use the new address, but how do you get Visual Studio to start using the new URL to connect for a solution you already have on your dev machine?
Here’s the process that’s worked for me across Visual Studio 2012 and 2010.
Remove the existing TFS Connection from The Team Explorer
Now Add a TFS Connection using the visualstudio.com URL
Open the TFS Source Control Explorer now you are connected using the new visualstudio.com address
Select the solution folder for the solution you have synced to the local workspace on your development machine. Right click the solution folder and select the Get Specific Version… option from the context menu.
Ensure you check the option to “Overwrite all files even if the local version matches the specified version”. This will effectively pull all files for the solution from TFS again even if there has been no change made to the files. This has the side effect of fixing the binding of the files so that after the sync the files will now be bound to visualstudio.com instead of tfspreview.com.
Once the sync has completed you should see the following message:
Click Yes, and you will get a dialog letting you know of any offline changes.
That should be job done. Your Solution Explorer should now show the TFS icons indicating the source control state of all the files and you’ve now left the tfspreview.com URL behind.
Other links referencing this issue:
I often have the need to distribute Visual Studio source code to external parties. Internally this source code is under source control in Team Foundation Server (TFS).
It would be nice if you could just take a copy of the source files and remove the source control binding (in Visual Studio). Unfortunately I haven’t found a way to be able to do this. Even when Visual Studio says that all bindings have been removed, if you try to open up the solution you get an error message along the lines “The solution you are opening is bound to source control on the following Team Foundation Server …”
Under earlier versions of Visual Studio I had used Visual Source Safe for source control and had used a utility called VSSBindingRemover which did the job quite effectively. It removed all source control files with the solution and project directories and modified the solution and project files themselves to remove source binding information.
The process for removing bindings is simple:
- Ensure you don’t have the solution/projects open in Visual Studio
- Copy your solution to a new directory (because the tool does modify files)
- Run the utility from the command line: VSUnbindSourceControl.exe d:\mysolution folder
Once the tool is finished, all the source control bindings have been removed from any solution and project files.