Thanks to this MSDN Forums post I was able to change the link included in every TFS notification e-mail to point to TSWA instead of the project portal.
Here’s the full story:
When using project alerts to get notified about work item changes you get an email containing a link to the project portal:
If you follow the link you might get a bit dissapointed when looking at this very basic work item details page:
Since Team System Web Access is now avaible from Microsoft free of charge we can change the link in the template for all notification messages to point to the new TSWA.
Changing the e-mail template
- On the TFS app tier open the folder:
%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services\v1.0\Transforms
- Create a backup of the file WorkItemChangedEvent.xsl, which we will be editing in the next step.
- Replace the text:
<xsl:value-of select="DisplayUrl" />
<xsl:value-of select="concat(substring-before(DisplayUrl,':8080/WorkItemTracking/WorkItem.aspx?artifactMoniker=’),':8090/wi.aspx?id=’,substring-after(DisplayUrl,’artifactMoniker=’))" />
The bold printed 8090 is the port where you installed TSWA at.
- Save the file and you are done.
If you now get a new notification e-mail and click on the link you’ll see the following much nicer work item details form provided by TSWA:
Note: Be aware that you either need to use Windows authentication with TSWA to make this work or you need to be already logged in and the session must be still alive.
I published a 2nd part: Changing TFS emails to link to Team System Web Access – Part 2
Would you like to send links to work items, team projects or source files on Team System Web Access?
For work items
… you can find the answer in the offical TSWA FAQ:
Q: What’s the URL to use if I want to send the link of a specific work item?
A: Work item links use the follwing format:
For Team Projects
… it also pretty simple:
For Source Files
… it’s a little bit more “interesting” (thanks to Hakan from Microsoft for reveiling the details behind this secret).
It’s a bit tricky but here it goes:
ItemData is the HtmlEncoded output of the query string something like “id=10&cs=-1”
In your example, the file id is 151611. So,
HtmlEncode(“id=151611&cs=-1”) -> “id%3D151611%26cs%3D-1”
[We’re planning to provide more friendly URLs in a future version, similar to wi.aspx approach]
To make it fast and more convenient to create links to TSWA I created a small tool to help you with it:
It should be mentioned that this tool has a lot of room for improvement.
You can download the source from an updated version here.
A customer asked:
“During my vacation my collegue was working on my machine and mapped the solution file to D:\Projects. Now I returned and wanted to map the solution to that folder as well, which obviously doesn’t work since it is already mapped.
How can I get rid of the workspace that my collegue has on my machine? (Since he won’t be working on my machine anymore it can be freely deleted.)”
First of all: you obviously need to be either the owner of the workspace or have the Administer workspaces permission on the Team Foundation Server to perform this.
Deleting a workspace using the command line
The command is:
tf workspace /delete [/server:servername] workspacename[;workspaceowner]
Deleting a workspace using GUI
If you prefer a rich UI you can use the free Team Foundation Sidekicks tool by Attrice Corp.
If you have the following error occurring every periodically when your warehouse is updated…
The description text is as follows:
Event Type: Error
Event Source: TFS Warehouse
Event Category: None
Event ID: 3000
Computer: Computer name
TF53010: An unexpected condition has occurred in a Team Foundation component. The information contained here should be made available to your site administrative staff.
Technical Information (for the administrative staff):
Date (UTC): 30.08.2007 08:58:00
Machine: Computer name
Application Domain: /LM/W3SVC/3/Root/Warehouse-3-128328371118437500
Assembly: Microsoft.TeamFoundation.Warehouse, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Process Name: w3wp
Process Id: 3413
Thread Id: 4027
Account name: TFSService Account
Detailed Message: Microsoft.TeamFoundation.VersionControl.Adapter: An error occurred while processing changeset ChangesetID, unexpected exception:
Exception Message: Object reference not set to an instance of an object. (type NullReferenceException)
Exception Stack Trace: at Microsoft.TeamFoundation.VersionControl.Adapter.VCAdapter.persistChangesetInformation(FilePair fp, String sidForUserThatMadeChange, Boolean doOnlyRenameDebit)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
… there is help! Microsoft released a hot fix a few days ago:
FIX: When the Microsoft.TeamFoundation.VersionControl.Adapter adapter processes a changeset, the adapter may fail in Visual Studio 2005 Team Foundation Server
Get it at: http://support.microsoft.com/kb/940229/
Right now custom work item controls  are not supported by Team System Web Access . Instead your custom control you will see this unpleasant message: “Unable to create workitem control ‘ControlName’”.
While this is a sad thing for us users does that mean that we shouldn’t use Web Access? No, of course not…
One solution is to create a separate work item form layout for Web Access and remove all custom controls from it. (thanks to Serkan and Marcus for pointing me in that direction.)
All you need to do is duplicate the <layout> information in your work item xml file.
Let’s do it
The first section gets a target-attribute with the value “WinForms” like this:
The second targets the “Web”:
Last thing you need to do is change the “Type” attributes of all controls in the web layout to use “FieldControl” instead of your custom control.
Review the results
If you take my Priority Control example from  it would look like this:
Windows layout (in Team Explorer) will show the friendly priority list (= the custom control):
Web layout in Team System Web Access doesn’t show the control, but instead it displays the regular field control. Not nice, but usable – and much better than the initial error message we had.
You can easily query for changes on a team project or a specified version control folder underneath and display them in a list with the check-in comments.
By using Team System Web Access (TSWA):
Note: I’m showing this first because the dialog is very comfortable, e.g. you can filter by user or time range.
- In TSWA on the “Source” tab, right-click any folder (team project folder or sub-folder) and select “Find Changesets”.
- In the “Find Changesets” dialog, select the desired filter criteria and confirm with “Find” to generate a list of changesets with check-in comments.
By using Visual Studio Team Explorer:
- In Team Explorer under “Source Control”, right-click any folder and choose “View History” from the context menu.
- The “History” window is shown with a list of all changesets (again with check-in comments) of the folder and sub-folders, which – as far as I know – cannot be filtered further.
By using Team Foundation Sidekicks (a free tool by Attrice):
- Start Team Foundation Sidekicks and open the History Sidekick by clicking on the third toolbar button (the clock with an arrow on it).
- On the left side, select a folder by clicking on it.
- On the right side in the “History” tab you will see the changes with an option to filter them by user.
By default, the email functionality in Team System Web Access (TSWA) is disabled and users will receive the following message when trying to use it:
“Sending email is not enabled. Please contact your administrator.”
To enable you need to change TSWA’s web.config file, which can be found under %ProgramFiles%\Microsoft Visual Studio 2005 Team System Web Access\Web.
Optionally you can specify which account to use when authenticating with the SMTP server and if SSL should be enabled as well as the default email address for the sender.
Where can you use the email functionality?
You can send…
- single work items (from the work item form)
- multiple work items, i.e. the result of a work item query
The email function can be found in the “Tools” menu.
The “Send Email” window allows you to specify the sender’s (“From”) and receiver’s (“To”) email address, as well as subject and message.
After hitting send a message box confirms that the mail was successfully routed to the email server.
This is how the receiver will see the message if it’s about a single work item:
… or about a work item query result:
Microsoft now offers version 2.0 of the Team System Web Access (formerly known as TeamPlain Web Access from DevBiz, which was acquired by Microsoft ) free of charge as a Power Tool with official Microsoft Customer Service support!
Download it from here.
Get a detailed list of all improvements here.
Make sure to read the Visual Studio Team System Web Access FAQ.
Here’s a list of how to enable logging for the various client and server components of VIsual Studio Team System:
TFS Client (Visual Studio IDE and command line tools):
devenv.exe.config (for Visual Studio IDE), tf.exe.config (for command line tools) as described in Ed Hintz on TFS Client Tracing. If you mainly want to measure performance the web service performance dialog can be added as a trave listener and is very helpful in that case.
Team Foundation Server
You can turn on tracing globally or for specified components only.
Team Foundation Server Activity Logging
Records web service method calls. See here how to enable and here, here and here how to analyze the data.
Team Build Server
Look into the config file for instructions on how to enable tracing, typically found in: %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\tfsbuildservice.exe.config.
Team Test Load Agent
You can turn on logging in the QTController.exe.config (for the Controller) and QTAgentService.exe.config (for the Agents). More information can be found here.
You might also be interested in other useful logging options for .NET.