Increase TFS 2013 task board work item limit

Today one of our task boards hit this:

Board exceeded number of items allowed

No worries, we’ll just follow the link and increase the limit. That however takes you to Customize the Task Board Page for Visual Studio 2012. From what I have done previously I knew this would not apply to TFS 2013. The command is to export the agile process config and in 2013 this has all been combined to be the one process config. Looking through my process config though I could not find the IterationBacklog element, so I run the command anyway and get:

Warning: This command is obsolete. Use 'witadmin exportprocessconfig' instead.

In the 2013 process config, although there is not an IterationBacklog element, there is PortfolioBacklog, RequirementBacklog and TaskBacklog. The same attribute workItemCountLimit still applies and it goes on the TaskBacklog element. The details can be found in Configure and customize Agile planning tools for a team project.

The steps however are very simple:

  1. Export your process config
    witadmin exportprocessconfig /collection:http://tfs:8080/tfs/DefaultCollection /p:TeamProject /f:ProcessConfiguration.xml
  2. Add workItemCountLimit attribute to your TaskBacklog element

    <TaskBacklog category="Microsoft.TaskCategory" parent="Microsoft.RequirementCategory" pluralName="Tasks" singularName="Task" workItemCountLimit="800">
  3. Import your modified process config

    witadmin importprocessconfig /collection:http://tfs:8080/tfs/DefaultCollection /p:TeamProject /f:ProcessConfiguration.xml

Note that the default is 500 and the maximum allowed is 1500.

Technorati Tags:

No need to use DateTime UTC again!

We were always taught, whenever storing or comparing dates always store them as UTC. That’s how I remember it at least. But that is not actually the correct answer. According to the detailed Coding Best Practices Using DateTime in the .NET Framework the rules state “a developer is responsible for keeping track of time-zone information associated with a DateTime value via some external mechanism”. Which leads to the recommended Storage Strategies Best Practice #1:

When coding, store the time-zone information associated with a DateTime type in an adjunct variable.

I don’t think I have ever seen this actually done. But no worries, since .NET 3.5 and SQL Server 2008 there is new type to use. Today I was just introduced to DateTimeOffset. This solves the issues of storage and calculations ensuring that the time zone offset is always stored with the date.

Represents a point in time, typically expressed as a date and time of day, relative to Coordinated Universal Time (UTC).

The code sample on the documentation page I think shows the difference and usefulness quite well.

using System;

public class DateArithmetic
{
   public static void Main()
   {
      DateTime date1, date2;
      DateTimeOffset dateOffset1, dateOffset2;
      TimeSpan difference;

      // Find difference between Date.Now and Date.UtcNow
      date1 = DateTime.Now;
      date2 = DateTime.UtcNow;
      difference = date1 - date2;
      Console.WriteLine("{0} - {1} = {2}", date1, date2, difference);

      // Find difference between Now and UtcNow using DateTimeOffset
      dateOffset1 = DateTimeOffset.Now;
      dateOffset2 = DateTimeOffset.UtcNow;
      difference = dateOffset1 - dateOffset2;
      Console.WriteLine("{0} - {1} = {2}", 
                        dateOffset1, dateOffset2, difference);
      // If run in the Pacific Standard time zone on 4/2/2007, the example 
      // displays the following output to the console: 
      //    4/2/2007 7:23:57 PM - 4/3/2007 2:23:57 AM = -07:00:00 
      //    4/2/2007 7:23:57 PM -07:00 - 4/3/2007 2:23:57 AM +00:00 = 00:00:00                        
   }
}

When would you prefer DateTime over DateTimeOffset? Introduced here by the BCL team and it is detailed when you may want to use the DateTime over the DateTimeOffset. Summarized I would say it is when you are doing interop with OLE or when you don’t care about time only date, like birthdays.

DateTimeOffset is the new preferred type to use for the most common date time scenarios.

Shortcomings due to the loss of time zone information and only using the offset is the main issue. If you are really serious about dates and time and are heavily using them, you may consider Noda Time started by Jon Skeet. My only issue with using DateTimeOffset virtually all the time in place of DateTime is that I have only found out about this years later.

Technorati Tags: ,

Analyzing Installer Log Files–Getting Started with Windows Installer Verbose Log Analyzer

The Windows Installer engine, msiexec.exe, is a bit of a black box. To see inside that box you can run your installers (msi’s) from the command line with verbose logging using:

msiexec /i MySetup.msi /lv* install.log

Opening up this text file and looking over it directly is not super helpful. Fortunately there is a tool for this but it is obscure and you need to know what it is called and where it is. It is the Windows Installer Verbose Log Analyzer (WiLogUtl.exe). How is that for a name! It comes with the Windows SDK and is found in C:\Program Files\Microsoft SDKs\Windows\v<x>.0\Bin, where <x> is you SDK version, e.g. 7. I’ve upload the WiLogUtl.exe, which is all you need, to OneDrive here for easier accessibility.

Windows Installer Verbose Log Analyzer

The tool is quite cumbersome, but does the job really well. You start by press the Browse button and select your log file. The Open button only opens the file in notepad, as below, which is a really pointless function. The magic is in the Analyze button.

Notepad install.log

This particular 514 KB 2233 line log file is of a failed install. Finding the error is tricky. After hitting Analyze the error is the first thing shown.

Detailed Log View

So I had an error in my Custom Action CA_IISGetSelectedWebSite. The States button shows the Feature and Component states through the install. So if you have an unselected feature, you will see it here.

States

The Properties is one of the most useful views. It details what the properties were defined at during difference stages on the install, note the Client, Server or Nested options at the bottom.

Properties

The next useful view is the HTML Log. This is just a color code view of the log file with helpful navigation buttons. It makes getting at the detail simple and understandable.

HTML Log

If you have to debug Windows Installers this will save you a bunch of time and headache.

Technorati Tags: