Thursday, 10 October 2013

TFS 2012/2013 - Different Layouts for Work Items in Web Access and VS/Team Explorer

Have you ever thought of having a different layout for a given work item in TFS Web Acess & inside Visual Studio/Team Explorer? Is it possible? Yes. It is. Let me show you how.

I am trying to have different layout for my User Story work item.

First I download the UserStory template xml using power tools.


Now for folks who are used to do TFS customizations only with power tools..Hey this not going work that way..You need to have a bit of a  XML here.

Open the downloaded UserStory.xml file (for safety I keep original and use a copy of UserStory.xml as UserStoryModified.xml)

Go to the  Form node and copy the Layout node content and paste it between Form xml tags

Then Add attribute Target to each of the Layout node "WinForms" for Visual Studio/Team Explorer, "Web" for Web Access layout.



Important: If you have used Name attribute in any nodes of the duplicated Layout node content make sure the "WinForms" and "Web" layouts have different names defined for example like below.



Now we can customize the layouts as we would like it to appear in Web Access & within Visual Studio or Team Explorer. (Again if you try to open this with TFS power tools you will only see the Layout which is in top. So you have to do this in xml :) )

 For Visual Studio/ Team Explorer

For Web Access



After importing UserStoryModified.xml with power tools,

User Story in Visual Studio/Team Explorer



Same User Story in Web Access


Cool isn't it?

For more info check below

Specifying Different Layouts for Different Targets
Design the Layout of the Work Item Form


Wednesday, 9 October 2013

TFS - Adding HTMLFeildControl to Work Item

There are two important points to consider if you are adding HTMLFeildControl to a work item.

1. First You need to have the correct type for the field that you are adding. HTML is the type that works for HTMLFeildControl.




To illustrate I have added three fields, two having type HTML and one having plain text. See the behaviour of the "PlainText" type field on a HTMLFieldControl. It does not give the HTML field control editiong options and notifies an error with color.



2. Use MinimumSize attribute

Tip from MSDN 

"When you add several HTMLFieldControl elements on a form that will be stacked vertically, you should specify the MinimumSize attribute for each field control. In this manner, you can make the text boxes all a similar size. Otherwise, the last HTML control element is sized to fill the form, and the previous elements appear together with smaller text boxes."

For more information refer Control the Display of Work Item Fields: Adding Formatted Text Fields


Friday, 4 October 2013

Backlog Priority - How it works

I was trying to answer a question posted in MSDN forum and to explain how Microsoft.VSTS.Common.BacklogPriority works. I have done a small test cycle. Thought worth sharing it here for everyone's benefit.

Test 1: I created PBI through web access just providing Name and click add in Backlog.
Test 2: I create PBI with web access going to Queries-->New-->PBI
Test 3: Changed Microsoft.VSTS.Common.BacklogPriority manually.

See how it behaves..and hope you will have a clear understanding of  Microsoft.VSTS.Common.BacklogPriority. In terms of usage you can go through this MSDN article.






Thursday, 3 October 2013

ALM with VS & TFS 2013 - Overview Session - Sri Lanka .Net User Group

I did an overview of ALM with VS & TFS 2013 session @ Sri Lanka .Net User Group today. Crowd seem to be enjoying the details.. :)

It was an awesome experience for me to try out the TFS 2013 & VS 2013 RC. For doing this session got lot of inspiration from





Tuesday, 1 October 2013

TFS 2013 - Power Tools Now Available

Good news! TFS 2013 Power Tools are available @ http://visualstudiogallery.msdn.microsoft.com/f017b10c-02b4-4d6d-9845-58a06545627f and even VS 2005 version control compatibilty (TFS 2013 MSSCCI Provider for VS 2005) is also available @ http://visualstudiogallery.msdn.microsoft.com/06c8e056-7f77-4a5c-9b8b-49318c143df8

Still 64 bit version of TFS 2013 MSSCCI Provider for VS2005 not available but will be available sooner @ http://visualstudiogallery.msdn.microsoft.com/22d38324-051c-4f04-9379-ff78e7116c8d

If you come across the error
"The Windows Shell Extension component cannot be installed side-by-side with previous versions. In order to continue, you must deselect that feature, or cancel this installation, uninstall the previous Windows Shell Extension, and restart this installation."





while installing TFS 2013 Power Tools you can folow the steps I have specified to get the installation going.

1. Go to control panel -> Uninstall a Program and look for the latest TFS Power Tools version that you have installed. In my case it is TFS 2012 update 2 power tools. Click on change.


2. Select Modify in the wizard




3. Remove Window Shell extension feature and proceed.




4. Now retry installing TFS 2013 Power Tools




7. Reboot your machine.

8. All good and your TFS 2013 Power Tools are good to go with VS 2013 RC




Friday, 20 September 2013

TFS - How to Restore Deleted Files

Have you ever wanted to find a deleted file in TFS and Restore/Undelete it? Is it possible? Yes. It is. Let me show in few quick steps how you can restore a deleted file in TFS using Visual Studio Source Control Explorer.

1. Your VS Source Control Explorer would normally look like below and will not show the deleted files.


2. Go to Tools --> Options in Visual Studio menu and open the options. Select Source Control --> Visual Studio Team Foundation Server and tick the option "Show deleted items in Source Control Explorer" and click OK.

  

3. Now you can see the deleted files appear in Source Control Explorer. Right click on the Folder/File you want to restore and click "Undelete" to get it restored.



Friday, 13 September 2013

TFS 2012 - Build/Release Notes with Community TFS Build Manager

Community TFS Build Manager is really useful add-on to VS 2010/2012/2013 to  create Build/Release Notes automatically.

You can download this free from Visual Studio Gallery  and this project source code can be found here at codeplex if you want to further customize.

Once you install Community TFS Build Manager you can see a new link appear in VS Team Explorer as below.


Launch this tool and select the builds.


Right click on the build which you want to generate a release note, and click on "Experimental Build Note".


Set the necessary information.






Click "Generate" and there you go...





Awesome. Isn't it?

For information on getting the necessary changesets associated to a build see my post TFS 2012 - Get a Release Build With Changesets Associated From a Given Changeset

Tuesday, 10 September 2013

TFS 2012 - Get a Release Build With Changesets Associated From a Given Changeset

If you have created a new release build definition with TFS for an application that is already in Production (which is deployed to production without a TFS build), you may want to do the next release build with changesets associated from a given changeset (from the last changeset delivered to Production).

To make it clear have a look at below source control history in my demo app. My changeset 87 has already gone into Production. Now I am creating a new TFS release build definition and when I queue a build in this release build I want it to get associated with chagesets 93 to 97.



If  I queue a build with will build for latest sources in the TFS and no changesets get associated to the build.


To get my changesets 93 to 97 associated to build first I need to build for changeset  87. Then I can build for latest solution and it will associate from 93 to 97.

I can specify the changeset to build by advance options "Get Version" when I queue a build like below.





 Now when I queue the build it builds for changeset 87.


Now I queue another build with not specifying a changeset. This will build the latest sources


This build will associate the changesets from 93 to 97 as I expected



If it is necessary I can repeat the same steps to do another build from this definition to associate set of changesets that I would like to associate with it.

I will explain how to generate a Build Note with TFS build in my next post.

There are few types of parameters that can be send to "Get Version" of advanced options of queuing build. For details check http://msdn.microsoft.com/en-us/library/gg490833.aspx#VersionSpecs

Popular Posts