TFS & Visual Studio ALM - by Neno Loje

(formerly Team System, VSTS)

News

Recent Posts

Community

Tags

Email Notifications

VSTS Blogs

VSTS Community

My Other Blogs

German VSTS Websites

Archives

March 2011 - Posts

How can I temporarily suspend TFS event notification mails?

There is no built-in command to achieve this.

Workaround

You can turn off all e-mail alerts in the TFS Admin Console by unchecking the "Enable Email Alerts" checkbox.

Thanks Rich for making me aware of the typo!

Alternatively you could also remove disable SMTP settings via command line:

%ProgramFiles%\TFSConfig ConfigureMail  /Enabled:False|True

(Special thanks to Jim Lamb, Microsoft, for making me aware of the command line, and Martin Kulov and Tiago Pascoal for the idea to just disable the SMTP settings.)

Updated:

  • 03/28/2011: Changed the command line parameters from using the SMTP settings (/FromEmailAddress:EmailAddress /SmtpHost:SMTPHostName) to just use "/Enabled:True|False" (Thanks to Rich Hundhausen for making me aware, Thanks to Jim again for providing the undocumented parameter).
Who created that TFS event subscription?

In TFS you can use Project Alerts or Alerts Explorer to edit your subscriptions. You will not see subscriptions created by others.

To see all subscriptions you could have a look at the tbl_EventSubscription table in the collection database (Caution: Do not make any changes to the TFS DBs!).

I am getting mails from TFS - who created that subscriptions?

To find out which user identity is hidden behind the GUID in the "SubscriberId" column, you can use the following SQL statement

SELECT  es.Id,
        es.EventType,
        es.Expression,
        sic.mail_address,
        sic.computed_display_name
FROM    tbl_EventSubscription es
JOIN    [Tfs_Configuration].[dbo].tbl_security_identity_cache sic
ON      sic.tf_id = es.SubscriberId
WHERE   es.Id = 123

where 123 is the Subscription ID (see "Id" column in the screenshot above).

(Thanks to Patrick Carnahan from Microsoft for helping me out with this and providing the SQL statement above)

Enriching your Work Item Descriptions by Moving them to a HTML field

In the Visual Studio Scrum 1.0 process template (and most likely in future process templates), Microsoft is using HTML fields with rich formatting for the work item description fields.

In VS Scrum 1.0…

  • Product Backlog Items and Tasks are using Microsoft.VSTS.Common.DescriptionHtml.
  • Bugs are using Microsoft.VSTS.TCM.ReproSteps instead.

You can customize your current process template and add a new HTML description today.

To move the data from your existing Description (Reference Name: System.Description) field to a new HTML-enabled field, you can use the TfsMoveDescription command line tool:

tfsmovedescriptions.exe /collection:<URI> /teamproject:<name> /workitemtype:<name> /newfield:<name>

Quickly move descriptions from the old plain-text field to a new HTML-based field

Download the tool from here: TfsMoveDescriptions.exe (.ZIP, 4,54 KB)

Prerequisite: This tool requires Team Explorer 2010 to be installed.

Trouble installing SharePoint 2010 Prerequisites because it cannot configure IIS on Windows Server 2008 R2?

Problem

The prerequisites installation fails with errors configuring IIS.

Resolution

  1. Make sure to install all available Windows Updates.
  2. Try to manually install the required IIS features by executing the following command:

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures; IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors; IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility; IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics; IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools; IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication; IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic; IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility; IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel; WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation; WCF-NonHTTP-Activation

For more details visit this page:
http://msdn.microsoft.com/en-us/library/ee554869.aspx

Licensing Changes in TFS 2010: Creating work items and viewing the once created by the user does not require a CAL

Finally creating bugs from external customers is now CAL-free as well.

The real news here is that the existing exception, under which you do not need a Team Foundation Server client access license (TFS CAL), is now valid for internal as well as external users.

This is what the Licensing White Paper says:

Client Access License Exception for Certain Work Items

A user does not need a CAL or External Connector License to create new work items or to update work items that that same user has created. This exception applies only to work items related to defect filing or enhancement requests. However, a CAL is required when a user views or modifies a work item created by another user or interacts with Team Foundation Server in any other way.

[…]

Hands-On Labs: ALM features in Visual Studio 2010

The Visual Studio 2010 and .NET Framework 4 Training Course contains the following 10 hands-on-labs:

Scrum Release Burndown chart: No data available

Problem

The Release Burndown (from the VS Scrum 1.0 template) stays empty and shows "No data available".

How to fix

  1. Make sure to specify Start / End Date on the corresponding Sprint work item.
  2. Wait until the warehouse is refreshed (or invoke it manually).

(Thanks thanks to Ruiz Yi for his post on MSDN Forums)

Refresh TFS Warehouse, Cube and Reports on demand

By default, TFS will process it's Data Warehouse and Analysis Services Cube (and thus update the data for the reports) every 2 hours.

You can change the default frequency or manually invoke cube processing, if needed.

Be careful with changing it to lower values than every hour:

Important

If you reduce the interval to less than the default of two hours (7200 seconds), processing of the data warehouse will consume server resources more frequently. Depending on the volume of data that your deployment has to process, you may want to reduce the interval to one hour (3600 seconds) or increase it to more than two hours. [Source: MSDN]

Alternatively you can use this small command line utility:

Syntax/Usage:

tfsrefreshwarehouse.exe /server:http://servername:8080/tfs [/full] [/status]

Manually process the TFS Warehouse and Cube

Using just the /status paramter returns useful information about cube processing:

Using /status shows the last and next scheduled sync times

(Note: The user needs to have the 'Administer Warehouse' permission in TFS)

Download the tool from here:

Update:

  • You can specify "/status" to only query the time of the last warehouse/cube update.
Could not write lines to file FileListAbsolute.txt. Access to the path is denied.

You receive the following error message:

C:\WINDOWS\Microsoft.NET\Framework\v4.0\Microsoft.Common.targets(3246,9): error MSB3491: Could not write lines to file "obj\Release\abc.Common.vbproj.FileListAbsolute.txt". Access to the path 'c:\TFS Builds\Sources\abc\obj\Release\abc.Common.vbproj.FileListAbsolute.txt' is denied.

Possible Cause:

Have you checked in the "obj" and "bin" folders?

To resolve this issue:

  1. Delete the "obj" and "bin" folder in source control.
    (usually those are not checked in)
  2. Delete the "obj" and "bin" folders on your hard disk.
    (they will be re-created during build)
Download files from TFS version control and set the file last access timestamp to the file's last check-in time

Often I hear the following questions about TFS version control:

  • Can I just download files or folders from TFS without having to create a workspace?
  • Can I specify that files do not have the read-only attribute set?
  • Can I configure that files show the last check-in time as last write time?
  • Can can I "export" files from TFS and remove the bindings to my TFS?

The answer is: Yes, you can!

Using tfsexport.exe:

Corrected the typo - Thanks, Matt!

A few notes on what the tool offers:

  • Files/Folders are downloaded from TFS without requiring a workspace.
  • There is no read-only flag set on the files exported.
  • Optionally sets the file time to the time of last check-in.
  • Optionally removes the source control bindings (from VS solution/project files).

Download the tool from here:

Prerequisite: This tool requires Team Explorer 2010 to be installed.

(Special thanks to Grant Holliday and Marcel de Vries)

Solved: Error creating a new Test Case in VS 2010

You receive the error message:

Work item type is not valid. You must specify a valid work item type.

You cannot create a new Test Case work item

Solution:

You need to import work item categories using witadmin like this:

importcategories /collection:http://server:8080/tfs/collection /p:Project /f:categories.xml

MSDN docs: http://msdn.microsoft.com/en-us/library/dd273721.aspx

You can extract the categories.xml from the Process Template definition.

(Thanks to Ruiz Yi from MSDN Subscriber Support for his post with the solution)


Your Visual Studio 2010 is running slow?

Making your VS 2010 run fasterThere's a new "Visual Studio Troubleshooting" page available on MSDN:

Information on how to troubleshoot your hardware/software configuration to gain optimum efficiency while using Visual Studio 2010.

Link: Suggestions for Improving the Performance of Visual Studio

Building Silverlight 4 apps with Team Build 2010

You need to install the Siverlight SDK on your build servers!... and run the 32-bit Build Tools on a 64-bit machine.

Error messages:

The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

or

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.Common.targets (104): The Silverlight 4 SDK is not installed.

Required Steps:

  1. Install Silverlight 4 SDK on Build Agents.
  2. In the Build Definition, change the MSBuild Platform from Auto to x86, as described here.

(Thanks to Jimmy Lewis, Martin Hinshelwood and Bart Wullems for their blog posts.)

Getting started with Visual Studio Test Professional

Overview VideosMicrosoft updated the Visual Studio website to include:

Overview Videos:

  • Visual Studio Test Professional Overview
  • Test Planning with Visual Studio 2010
  • Test Authoring and Test Running with Visual Studio 2010
  • Test Automation with Visual Studio 2010
  • Tracking Quality with Visual Studio 2010

How do I videos"How do I" Videos:

  • How Do I: Plan Tests with Visual Studio 2010
  • How Do I: Author and Run Tests in Visual Studio 2010
  • How Do I: Automate Testing with Visual Studio 2010
  • How Do I: Track Application Quality with Visual Studio 2010

Evaluators GuideFurther Reading:

  • Test Professional 2010 Evaluator’s Guide
  • Hands-on-Labs
  • Free e-Book Chapter

Link: http://www.microsoft.com/visualstudio/en-us/try/test-professional-2010-tour

What's the maximum number of Work Items?

Work Item IDs can not be higher than Int32.MaxValue or 2,147,483,647.

(Thanks to Jim Lamb)

Clean old and unused workspaces and shelves from your TFS

The command line utility "tfsclean.exe" helps  with two scenarios:

  • You want to find and delete old worspaces and shelvesets (oder than XX days).
  • You want to find and delete workspaces and shevlesets from a certain user
    (e.g. when the user left the company)

Caution: There's no way to recover a shelveset once it is deleted.

Usage:

tfsclean.exe /collection<URI> [/delete] [/maxage:n] [/username:text] [/excludeworkspaces] [/excludeshelvesets]

Required parameters:  
/collection:<URI> URI of Team Project Collection (e.g. http://servername:8080/collection)
Optional parameters:  
/delete Required to actually delete items (otherwise it runs in readonly mode)
/maxage:<number> Specified the maximum age in days (default is: 365)
/username:<name> Only clean items from specified user (e.g. DOMAIN\username)
/excludeworkspaces Do not clean workspaces.
/excludeshelvesets  Do not clean shelvesets.

tfsclean cleans up old workspaces and shelvesets

(Note: The user needs to have the 'Administer workspaces' and 'Administer shelved changes' permission on TFS)

Download the tool from here: TfsClean.exe (.ZIP, 4,87 KB)

Prerequisite: This tool requires Team Explorer 2010 to be installed.

How to ping TFS to see if it's up and running

The command line:

pingtfs.exe /server:http://myserver:8080/tfs

Run the pingtfs command to see if your TFS is responding.

(Note: pingtfs.exe will return an exit code of 0 if the ping succeeded, otherwise it will return an exit code other than zero.)

Download the tool from here: PingTFS.exe (.ZIP, 7,45 KB)