November 2008 - Posts
How To: Change Estimate/Remaining/Complete Field Format To Days Instead Of Hours
I receive the following question:
How do I change the format for reporting a work: estimate/ remaining/complete - to days instead of hours???
Here is my answer for that question:
To download a mapping file
-
Open a Command Prompt window.
-
Open the folder where Visual Studio is installed (for example, drive:\Program Files\Microsoft Visual Studio 9),
and in that folder, locate \Common 9.0\IDE.
The TFSFieldMapping.exe utility program is in this folder.
-
Download the mapping file by using the TFSFieldMapping.exe utility by typing the following at the command prompt:
TFSFieldMapping download http://TFSServerName:8080 TeamProjectName MappingFile.xml
Now open MappingFile.xml and look for CompletedWork, RemainingWork, BaselineWork.
Change the ProjectUnits to pjDay instead of pjHour.
Like This:
<Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.CompletedWork"
ProjectField="pjTaskActualWork" ProjectUnits="pjDay" />
<Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.RemainingWork"
ProjectField="pjTaskRemainingWork" ProjectUnits="pjDay" />
<Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.BaselineWork"
ProjectField="pjTaskBaselineWork" ProjectUnits="pjDay" />
Save MappingFile.xml.
To Upload the mapping file back to TFS
TFSFieldMapping upload http://TFSServerName:8080 TeamProjectName MappingFile.xml
Now you give your estimation in Days and Not in Hours.
But you can see that the value from Team System automatic translated into Hours in MsProject,
Change The Days to Hours Calculation
Click on Tools -> Options
Goto "Schedule" Tab and change "Work is entered in:" to Days
Here is the new View
Enjoy.
Skype Collaboration Provider for TFS
New project on CodePlex - Team Foundation Server Collaboration Providers
The Team Foundation Server 2008 Power Tools enable rich integration with other team members via IM and VoIP chat.
Out the box the power tools integrate with Live Communicator and Windown Live Messenger (MSN).
This project is for community contributed providers for other systems
Recording Web Test Using Fiddler
Some times Web Test Recorder can't catch all the information we need for our Web Test.
For this problem we can use Fiddler to catch all the information we need.
First Download Fiddler 2
After Fiddler is open and in capture state you can open Internet Explorer and start recording your web Test.

After you finish the recording save the desire requests as Visual Studio Web Test.
After saving your Web Test, open Visual Studio and add into your test project the Web Test.

How can I tell a Web Test to ignore 404 errors?
Some times your web test failed because a missing image or old file that not longer exists in the IIS.
Why the Web Test fail all the test because one missing Image? Your absolutely Right!
I'll show 3 different ways to solve this.
1. Expected HTTP Status Code
The First thing you can do is to set "Expected HTTP Status Code" to 404.
But this will not work if the bad request is a dependent request.

2. Add Dependent Request
You can add this request manually and then set the "Expected HTTP Status Code" to 404.
3. Write WebTestPlugin
But if those not working because different requests and other parameters you can use WebTestPlugin
In the sample bellow the Plugin searches for the right dependent and remove it from the WebTest,
like this you can run a web Test with 404 request and still make the WebTest to Pass
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.TestTools.WebTesting.Rules;
using Microsoft.VisualStudio.TestTools.WebTesting;
using System.ComponentModel;
namespace TestProject
{
[DisplayName("Dependent Request Plugin")]
public class DependentPlugin : WebTestPlugin
{
string dependent = "badimage.gif";
public override void PostRequest(object sender, PostRequestEventArgs e)
{
WebTestRequestCollection DependentToRemove = new WebTestRequestCollection();
foreach (WebTestRequest req in e.Request.DependentRequests)
{
if (!string.IsNullOrEmpty(dependent) && r.Url.EndsWith(dependent))
{
DependentToRemove.Add(req);
}
}
foreach (WebTestRequest dependent in DependentToRemove)
{
e.Request.DependentRequests.Remove(dependent);
}
}
}
}
October 08 TFS Power Tools Available!
You can read about all the cool new stuff in this release here: http://blogs.msdn.com/bharry/archive/2008/10/01/preview-of-the-next-tfs-power-tools-release.aspx.
Couple of new things, The include:
tfpt searchcs - A new tfpt command that allows you to search for checkins, filtering by date, user, path, and string matches in the comment and checkin notes.
It's a very handy tool if you are looking for a checkin but aren't 100% sure what you are looking for.
Improved setup - The new setup now installs for "all users" rather than just the current user.
OS - Power Tools can be installed and run on 64-bit clients
Download Power Tools October 08 -
http://www.microsoft.com/downloads/details.aspx?FamilyId=FBD14EEA-781F-45A1-8C46-9F6BA2F68BF0&displaylang=en
How To: Change TFS Mail Alert Format
Couple of customers asked me to change the TFS alert format?
So here is the solution:
To perform this action you need Administrator permissions
Drive:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services\v1.0\Transforms
Use an XML editor such as Visual Studio to change any of the transforms. These are the two transforms for the work item event:
WorkItemChangedEvent.xsl - Formatting for HTML e-mail
WorkItemChangedEvent.plaintextXsl - Formatting for plaintext e-mail
The .xsl file transforms the XML for the event into an e-mail message.
Open WorkItemChangedEvent.xsl in Notepad or other text editor.
Edit the file to reflect the message that you want in the notification e-mail.
You should make the similar changes to the WorkItemChangedEvent.plaintextXsl for any users who have signed-up for plaintext messages.
Save the WorkItemChangedEvent.xsl file.
How To: Open Test Project Without Team System
If you have visual studio 2005 and you want to open a Test Project you can't!
But here is a workaround to let open Test Project in Visual Studio 2005 and add test methods but will not be able to execute it.
Reverse also possible.
Right click on the project and choose “Edit …” to open the project file as XML. Delete the line that looks like this:
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> Save and close the XML file. Right click on the project and reload it.
Team Foundation Build Load Balancer
Is a new project published on CodePlex called Team Foundation Build Load Balancer that
balances builds between the build agents defined in a Team Project reducing the time developer's wait for builds to complete.
It's a very simple tool that you need to run from command-line.
Example:
- You need to pass the Team Foundation Server's URL as the first parameter to TeamBuildLoadBalancer.exe, for example, TeamBuildLoadBalancer.exe http://TFSRTM08:8080/.
- You can optionally pass one or more Team Project names to limit which Team Projects it will load balance, for example, TeamBuildLoadBalancer.exe http://TFSRTM08:8080/ TeamProjectA TeamProjectB. If you don't specify any Team Projects then all Team Projects will be load balanced.
- You can optionally pass one or more build agents to exclude from load balancing, for example, TeamBuildLoadBalancer.exe http://TFSRTM08:8080/ -ExcludeBuildAgent:MySecretBuildAgent. If you don't specify any build agents to exclude then all build agents will be load balanced.
- The scheduled task needs to run as a user that is a member of the Build Services security group in each Team Project it will load balance.
Team Explorer window is empty
If you seeing this problem...
- Make sure Visual Studio is closed (and devenv.exe not in memory anymore)
- Run: devenv /setup
- Check if it's fixed already. If not, close down VS again.
- Run: devenv /resetuserdata
The Team Explorer window should now look like expected again.
Reading Web Sites Status on IIS with .Net
This is some ability I needed for one of my tools.
Using DirectoryEntry to get information about IIS Web Sites and AppPools.
Code Simple:
public WebSiteEntry[] GetWebSites()
{
string Path = "IIS://" + this.DomainName + "/W3SVC";
DirectoryEntry root = null;
try
{
root = new DirectoryEntry(Path);
}
catch
{
MessageBox.Show("Couldn't access root node", "Error", MessageBoxButton.OK, MessageBoxImage.Information);
return null;
}
if (root == null)
{
MessageBox.Show("Couldn't access root node", "Error", MessageBoxButton.OK, MessageBoxImage.Information);
return null;
}
ArrayList WebSiteList = new ArrayList();
foreach (DirectoryEntry Entry in root.Children)
{
PropertyCollection Properties = Entry.Properties;
try
{
WebSiteEntry Site = new WebSiteEntry();
Site.SiteName = (string)Properties["ServerComment"].Value;
Site.State = (string)Properties["ServerState"].Value.ToString();
<!-- 2 – Start , 4 – Stoped, 6 – Paused -->
WebSiteList.Add(Site);
}
catch { ; }
}
root.Close();
return (WebSiteEntry[])WebSiteList.ToArray(typeof(WebSiteEntry));
}
public class WebSiteEntry
{
public string SiteName = "";
public string State = "";
}
Working With TFS Data Manager
In the post I talked about Disaster Recovery for VSTS 2008 and now I will show how to work with TFS Data Manager.
Every one can download the trial version and check for your self Download Page
After downloading (9.5mb) the install is very simple.
Choose the backup location, make sure you have al least 800mb , basiclly it’s like SQL backup.
Select your Team System database and proper User & Password
After the installation you can open TFS Data Manager, Perform Backup for TFS.
This operation takes 5min (800mb).

After you finish the backup you can see all TFS backups you have created.

Disaster Recovery for VSTS 2008
Team System has become the kernel for many companies,
We all know that we can Backing Up a Team Foundation Server database using simple maintance plan in the database,
but is it enough?
What is TFS Data Manager?

At its core, TFS Data Manager provides Disaster Recovery for VSTS 2008, specifically Team Foundation Server.
This includes backing up and restoring an entire TFS server, individual Team Projects, or Entities, such as Work Items, Reports, Source Code, Builds, Documents and a project's Web Portal.
In addition to critical Disaster Recovery, TFS Data Manager also provides broader Data Management capabilities, such as migrating Team Projects, Work Items, Source Code and Documents from one TFS Server to another.
Finally, TFS Data Manager enables business and technical decision makers to address Visual Studio Team System Policy & Governance by providing analytics about the organization's physical and logical TFS infrastructure, exiting Team Project heath & activity, as well as integration into existing intranet and third party systems such as Microsoft Office SharePoint Server.
Why do I Need TFS Data Manager?
There are already some existing and well known methods for "backing up and restoring TFS" or "migrating team projects" within the VSTS Team Foundation Server environment and with other third party systems, so why is there a need for TFS Data Manager?
Below are the currently known methods for performing TFS Disaster Recovery or Team Project Migration, and the steps required vs. our recommended TFS Data Manager offering:


Reports Part 1 : Understanding Team System Reports

I think everyone knows that Team System can show Reports, but not everyone knows that Team System can show Reports on almost EVERYTHING you do inside Team System.
Also many people don’t understand the importance of Reporting and how using Team System Reports can help them improve the ALM process.
When I demonstrate to customers the Reports ability in Team System I get two different responses:
Customer 1: WOW!!!!
Customer 2: Why?
Here is some questions from customers:
- Why should I need to see Code Churn?
- PolicyOverride? Why??????????? (Usually from developers :-))
- I have all this info on excel why should I move to Team System Reports?
People need very good reason to work with something new instead of something they know very well, if a customer works with excel to get Reports he need to understand that Team System can save him a lot of Time do it Better and Faster!
This is what I’m going to show and learn.
Before starting to create Team System Reports I strongly recommends to understand Team System Reports:
Understanding the Data Warehouse Architecture
Understanding the Structure of the Data Warehouse Cube
How To: Associate Work Items To Tests
Every test you create whether it is Unit, Manual, Web or Load can have work items associated to them.
Let’s open Test View.

After Test View opend, load Test Project contains Test.
Select Test and in the Properties windows you will see “Associated Work Items” property.
Open this property.
Using Team System Work Item Picker makr the associated work items and click OK.

Now your test associated with Work Items, this will help you manage you testing.
More Posts
« Previous page