Archive for the VSTS Category

Additional Info on Mouse Gestures

Posted in UX, VSTS, blackpearl on June 2, 2008 by sidersdd

I blogged earlier on Mouse Gestures in K2 blackpearl.  Anthony Petro from K2 sent me some additional information about configuring the gestures.  In the \bin\configurationmanager.config file of your blackpearl install folder there is a <wizards> section where all of the wizards are configured.  Here you can register a Mouse Gesture to trigger the startup of a wizard.  For example, for the Default Activity wizard you will find the following configuration code:

<wizards><wizard text=”Default Activity”>
    <settings><add key=”MouseGestures” value=”A,O” />

In looking at the default configuration in this file, the default Mouse Gestures appear to be:

A, O - Default Activity
C - Default Client Event
M - Mail Event
P - InfoPath Client Event
S - Default Server Event (Code)
W - Default Server Event (Workflow)

In my previous post I also indicated it would be interesting to see this gesturing approach carried into other designers in Visual Studio.  It appears someone has already worked on this integration in the Mouse Gestures Add-In for Visual Studio out on CodePlex.  The add-in utilizes the more generalized Mouse Gestures for .NET component, which can be used to add mouse gesturing to any .NET application you write.   When I have time, I’ll be digging into these more.

Format XML in Visual Studio

Posted in VSTS on April 21, 2008 by sidersdd

Here’s an easy tip for formatting XML in Visual Studio which apparently isn’t very well known.  There are times I find myself using Visual Studio to view/edit an XML file, and the source XML is tightened with no line breaks (for whatever reason) after the nodes.  Below is one example.

<?xml version=”1.0″?>
<BrowserInfo><Browser><Name>Microsoft Internet Explorer</Name><Path>“C:\Program Files\Internet Explorer\iexplore.exe”</Path><Resolution>0</Resolution><IsDefault>True</IsDefault><DDE><Service>IExplore</Service><TopicOpenURL>WWW_OpenURL</TopicOpenURL><ItemOpenURL>“%s”,,0xffffffff,3,,,,</ItemOpenURL><TopicActivate>WWW_Activate</TopicActivate><ItemActivate>0xffffffff,0</ItemActivate></DDE></Browser><InternalBrowser><Resolution>0</Resolution><IsDefault>False</IsDefault></InternalBrowser></BrowserInfo>
     

You can use the Format Document (Ctrl+E, D) command from the Edit->Advanced menu to nicely format your XML document:

AdvancedFormatDocument

This results in a much nicer formatting of the hierarchical information:

<?xml version=”1.0″?>
<BrowserInfo>
  <Browser>
    <Name>Microsoft Internet Explorer</Name>
    <Path>“C:\Program Files\Internet Explorer\iexplore.exe”</Path>
    <Resolution>0</Resolution>
    <IsDefault>True</IsDefault>
    <DDE>
      <Service>IExplore</Service>
      <TopicOpenURL>WWW_OpenURL</TopicOpenURL>
      <ItemOpenURL>“%s”,,0xffffffff,3,,,,</ItemOpenURL>
      <TopicActivate>WWW_Activate</TopicActivate>
      <ItemActivate>0xffffffff,0</ItemActivate>
    </DDE>
  </Browser>
  <InternalBrowser>
    <Resolution>0</Resolution>
    <IsDefault>False</IsDefault>
  </InternalBrowser>
</BrowserInfo>

Visual Studio Object Test Bench

Posted in VSTS on March 11, 2008 by sidersdd

The Object Test Bench is a pretty cool feature of Visual Studio that I always seem to forget about.  It allows you to test code in classes you develop within Visual Studio without having to actually run an executable.  It’s a quick way to run an informal test on some code.

So, if you have a class named Foo, you can create an instance of this class from the Class View by right-clicking the class name and selecting the Create Instance menu item and then selecting Foo() from the submenu.  If you had multiple constructors, you could have selected the one of interest from the submenu.

OTBClassView

A dialog will display, allowing you to provide a name for the instance being created.  If your constructor had arguments then you would specify values here as well.

image

The Object Test Bench view then appears with a shape representing the instantiated Foo object.  You can right-click this shape and select the menu option for Invoke Method, and select a method from the list (such as Bar).

OTBObjectTestBenchView

Again, a dialog will display, allowing you to provide the values you want to send to the method invocation.  The Bar method takes two integer arguments, and returns the summation as an integer.

image

After providing some values (e.g.,5 and 6), and clicking OK, another dialog appears with the result.  This dialog also provides an option to persist the returned value back into the Object Test Workbench.  This allows you to use this object/value for subsequent method invocation, or serve as input into another method.

image

The Object Test Workbench is certainly not perfect.  For one thing, it does not support generics.  You may notice in the Foo example above there is an overloaded Bar method with nullable int arguments.  This overloaded method doesn’t even appear in the method invocation submenu, due to the generics.  This is true even with Visual Studio 2008.

The Object Test Workbench certainly is not intended to replace a more rigorous unit testing approach, such as that provided with the Team System functionality.  However it is a nice lightweight way to quickly test some code.

Troubleshooting TFS Data Warehouse

Posted in TFS, VSTS on January 18, 2008 by sidersdd

I was troubleshooting another issue with reports from Scrum for Team System, and came upon a better link that explains troubleshooting the TFS Data Warehouse.  It includes steps for rebuilding the warehouse using the web services.

Sprint List Not Updating in TFS Report

Posted in TFS, VSTS on January 16, 2008 by sidersdd

Recently I had a problem with some reports that are part of the Scrum for Team System add-in for TFS.  The drop down list of sprints in the Sprint Burndown Report was only showing a subset of sprints defined in the system.  The reports consume data from the TFSWarehouse database on the TFS server.  So I looked there to make sure the warehouse was being updated.  Querying the [Work Item] table revealed that the warehouse tables were in fact not being updated.  The only sprints found in that table were the ones showing up in the drop down list in the report.

Next step was to figure out why the warehouse wasn’t updating.  I peeked into the event log on the TFS server and found the following error in the Application log:

TF53010: An unexpected condition has occurred in a Team Foundation component.

Detailed Message: TF50801: The TFSServerScheduler service did not initialize. The Team Foundation Registration Service returned the following error: The registry for this computer either has no entry for, or contains multiple entries for, Team Foundation Server.

The part about ‘multiple entries for Team Foundation Server’ was key.  In the registry there is a key which lists the known TFS servers - - HKCU\Software\Microsoft\VisualStudio\8.0\TeamFoundation\Servers.  Sure enough, on this TFS server there were multiple entries found.  I’m guessing the extra server entries found their way in there as I was testing the TFS-to-TFS Migration Tool at one time.  I removed the extra entries, and left the one which referenced the current TFS server.  I then restarted the server to ensure this fixed the starting of the TFSServerScheduler.

Next task was to force a rebuild of the warehouse.  Steps for this can be found here.  I followed the web service steps.

Once that was complete, I verified the sprints were listed in the query, and then verified the sprints appeared in the drop-down list in the report.  All was working fine now.