The Problem
- You are configuring SMTP Settings for TFS 2010 and want to specify a different port for your SMTP server than the default port (which would be port 25)
Figure: TFS 2010 does not allow to set a custom SMTP port.
Solution #1: Change config file
- As answered here and here, you could add the following XML to the TfsJobAgent.exe.config file (usually located in C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\TFSJobAgent):
<mailSettings>
<smtp deliveryMethod="Network">
<network port="2525"/>
</smtp>
</mailSettings>
- Keep in mind that this is only valid for TFS notifications itself and not for notifcations from SQL Server Reporting Services or the SharePoint-based Project Portal.
The Solution #2: Install a local SMTP server
- Install the SMTP Service on Windows Server and ask it to route all SMTP traffic to a different SMTP server.
- On the Delivery tab, click Advanced, an enter the SMTP server name as "smart host".
- On the Delivery tab, click Outbound Connections, and set the TCP port (= SMTP port).

Figure: Setting up a local SMTP server has the great benefit that you can use it SMTP for other applications, too (like notifications from SQL Server Reporting Services or SharePoint).
Cross-posted from my other blog:
![Microsoft_SQL_Server_Logo_thumb[1] Microsoft_SQL_Server_Logo_thumb[1]](http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vstsblog.metablogapi/6013.Microsoft_5F00_SQL_5F00_Server_5F00_Logo_5F00_thumb1_5F00_thumb_5F00_260A3614.png)
The Problem
- You have a database (e.g. TFS collection database) in SQL Server Enterprise Edition.
- You want to backup and restore this database on a SQL Server Standard Edition.
- You get an error message on restore that some features are not supported.
The Solution
…
[Read the full post]
The Problem
- You are using DevExpress components.
- Compilation fails with the message:
'Cannot resolve dependency to assembly 'Microsoft.Windows.Design.Extensibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
The Solution
- Check your references and remove any reference to DevExpress.*.Design.dll's.
(Thanks to "Kookiz" who solved this.)
Steps:
- Download Team Foundation Server Power Tools.
- On the command line use the TFPT.exe utility to export all work items from a team project in .XML format:
tfpt query /collection:<URL> /format:xml /wiql:"SELECT * FROM WorkItems WHERE [System.TeamProject] = '<TeamProject>' AND [System.WorkItemType] <> 'Sprint' ORDER BY [System.Id]" > WorkItems.xml As you can see I selected all work items from the team project excluding Sprint Work Items. Feel free to modify the query, if necessary.
If you develop small utilities for Team Foundation Server a lot, you might want to save some time and use a project template (see bottom of post for download link) that already comes equipped with the correct references to the Team Foundation Object Model (Microsoft.TeamFoundation.*.dlls) as well as the most important using statements and a few lines of code to get started.
Installation
Copy the ZIP file to {MyDocuments}\Visual Studio 2010\Templates\ProjectTemplates.
Usage
Create a new project and select “TFS Utility” from the “Visual C#” list.
The template creates a new Windows Forms application with references to the Microsoft.TeamFoundation.*.dlls (btw: the C# compiler gets rid of all references that were not used in the project during compilation)…

… as well as a a few using statements and some code to start from.
Happy TFS tool development!
Download: TfsUtility.zip
This post is part of a blog series:
Steps:
- Download and install the freeware tool AIT WordToTFS from here (registration required).
- Start Microsoft Word (winword.exe). You should see a new "WordToTFS" ribbon.
- Choose the layout template you want to use (the names correspond to TFS process templates, but it's possible to furhter customize those layout templates).
- Once, you are ready to publish, click 'Connect' on the 'WordToTFS' ribbon and choose a team project to connect to.
- Start by creating an outline, headlines, introduction text as you would normally do when creating a requirements document in MS Word.
- Once you are ready to add a requirement, choose "Empty Product Backlog Item" (in the case of the "Visual Scrum Scrum" template; the name differs for other process template, e.g. "Requirement" in MSF/CMMI or "User Story" for MSF/Agile).
- This will insert a table with the typical fields to describe a requirement. Replace 'Title' and 'Description' with appropriate values (you can edit those defaults by clicking "Edit Default Values" on the ribbon).
- Repeat Steps 5 to 7 for additional requirements.
- Once you're happy with your requirement(s), click 'Publish' in the 'WordToTFS' ribbon.
- The work item is now created in TFS.
After publishing the requirement table looks smilar to this:
Notes:
- Keep in sync: After initially publishing your work items you can either change those in MS Word and re-publish those changes, or change the work items with a different TFS client and click 'Refresh' on the 'WordToTFS' ribbon to import those changes into your MS Word document.
- Images: You can insert images in the description field (if the process template is using an HTML-based field) and those will be updated as attachments:
- Test Cases with Test steps: You can enter a numbered list of steps for a Test Case, which will be translated to test steps (as they are required by Microsoft Test Manager):
Disclaimer: This MS Word integration is not part of Visual Studio or Team Foundation Server. The plug-in was developed by a Microsoft Partner (AIT) and not by Microsoft itself.
This post is part of a blog series:
Steps:
- Download and install the freeware tool AIT WordToTFS from here (registration required).
- Start Microsoft Word (winword.exe). You should see a new "WordToTFS" ribbon.
- Choose the layout template you want to use (the names correspond to TFS process templates, but it's possible to furhter customize those layout templates).
- Click 'Connect' on the 'WordToTFS' ribbon and choose a team project to connect to.
If the "missing mapping fields" dialog appears, you probably choose the wrong layout template (you can still change it before the next steps).
- Click 'Get Work Items" from the ribbon.
- On the 'Get Work Items' pane to the ride, select a stored query.
- Click on 'Find' button.
Optionally, deselect work items in the list if you want to exclude them.
- Click on 'Import' button.
- Enjoy!
Disclaimer: This MS Word integration is not part of Visual Studio or Team Foundation Server. The plug-in was developed by a Microsoft Partner (AIT) and not by Microsoft itself.
Issue:
TFS 2010 SP 1 fails with:
Product: Microsoft Team Foundation Server 2010 - ENU - Update 'KB2182621' could not be installed. Error code 1603.
Resolution:
In my case the log file indicated that permissions to the Master database were missing. I made sure the setup user got sysadmin priviledges for the time of the SP install and it went through very smoothly.
This is my personal selection of books covering TFS 2010:
Have fun reading!

Application Lifecycle Management for the Microsoft Platform
November 14th–18th, 2011 • Microsoft, Redmond Campus

Agenda & Registration at : http://www.alm-summit.com
Update: the session recordings can be found on Channel 9: http://channel9.msdn.com/Events/ALM-Summit/2011
Finally the book that Sam and I wrote on agile software engineering with Visual Studio 2010 is now avaialble.
I want to say thank you to our technical reviewers (David Starr, Claude Remillard, Aaron Bjork, David Chappell, and Adam Cogan), as well as to Ken Schwaber for providing the foreword.
Where to get it:
ISBN-10: 0321685857
Promotional Code
Our publisher, Addison-Wesley Professional, has put together a promo code that will allow you to order either the printed copy or the DRM-free PDF copy of the book for 35% off. Here are the details for that promo code: To purchase, go to InformIT.com and during step 3 of the checkout process, enter ASEVS5858 as the coupon code. This discount does not apply to the already discounted eBook/Print bundle. Offer valid until December 31st, 2011.
Sample Chapter
Table of Contents
Authors
- Sam Guckenheimer is the product owner for the Microsoft Visual Studio product line.
- Neno Loje is an independent Application Lifecycle Management (ALM) consultant and Visual Studio Team Foundation Server (TFS) specialist.
Book Description
Using agile methods and the tools of Visual Studio 2010, development teams can deliver higher-value software faster, systematically eliminate waste, and increase transparency throughout the entire development lifecycle. Now, Microsoft Visual Studio product owner Sam Guckenheimer and leading Visual Studio implementation consultant Neno Loje show how to make the most of Microsoft’s new Visual Studio 2010 Application Lifecycle Management (ALM) tools in your environment.
This book is the definitive guide to the application of agile development with Scrum and modern software engineering practices using Visual Studio 2010. You’ll learn how to use Visual Studio 2010 to empower and engage multidisciplinary, self-managing teams and provide the transparency they need to maximize productivity. Along the way, Guckenheimer and Loje help you overcome every major impediment that leads to stakeholder dissatisfaction–from mismatched schedules to poor quality, blocked builds to irreproducible bugs, and technology “silos” to geographic “silos.”
Coverage includes:
- Accelerating the “flow of value” to customers in any software project, no matter how large or complex
- Empowering high-performance software teams and removing overhead in software delivery
- Automating “burndowns” and using dashboards to gain a real-time, multidimensional view of quality and progress
- Using Visual Studio 2010 to reduce or eliminate “no repro” bugs
- Automating deployment and virtualizing test labs to make continuous builds deployable
- Using Test Impact Analysis to quickly choose the right tests based on recent code changes
- Working effectively with sources, branches, and backlogs across distributed teams
- Sharing code, build automation, test, project and other data across .NET and Java teams
- Uncovering hidden architectural patterns in legacy software, so you can refactor changes more confidently
- Scaling Scrum to large, distributed organizations
Whatever your discipline, this book will help you use Visual Studio 2010 to focus on what really matters: building software that delivers exceptional value sooner and keeps customers happy far into the future.
Previous Editions

Scenario
You are running TFS 2010 SP1 and want to make sure that all clients have (VS) SP1 (at minimum) applied.
Luckily, you can configure which clients get rejected when trying to connect to your TFS. You can even provide the message that will be displayed to users whose clients get rejected:

Solution
It's easy, you have to add two values to the TFS registry (and restart TFS):
- Key: /Configuration/Application/DisabledUserAgents/TFS10SP1
Value: "Team Foundation (*.exe, 10.0.<40219.1)" - Key: /Configuration/Application/DisabledUserAgents/TFS10SP1/Message
Value: "Sorry, you have to install Visual Studio 2010 Service Pack 1."
How to do that
Use the tfsreg.exe tool and run this two commands:
tfsreg.exe /server:http://servername:8080/tfs /path:/Configuration/Application/DisabledUserAgents/TFS10SP1 /value:"Team Foundation (*.exe, 10.0.<40219.1)"
tfsreg.exe /server:http://servername:8080/tfs /path:/Configuration/Application/DisabledUserAgents/TFS10SP1/Message /value:"Sorry, you have to install Visual Studio 2010 Service Pack 1."
Note: Replace the blue URI with your TFS' server URI.
Or download the ready-to-use BlockNonSP1Clients.bat (.ZIP)
Caution: Always remember do not directly edit the TFS registry entries by editing TFS' SQL databases manually. Always use the registry service (client or server) or the tfsreg.exe tool mentioned above (which does that) to modify TFS registry entries.
Future Compatibility Note: This mechanism might change or be implemented differently in future versions of TFS, there's no compatibility guarantee.
Update (2 Oct 2011): In TFS 2010 older clients (VS 2005 and VS 2008) that do not have Service Pack 1 and the appropriate Forward Compatibility Upgrade installed, will be rejected by default using this technique.
(Thanks to Philip Kelley, Taylor Lafrinere, and Buck Hodges from Microsoft for this tip).
If you don't know the owner name, is there another way to search for the shelveset?
In the "Unshelve" dialog, either enter the username, or use "*" (for all users):

(Thanks to VS ALM MVP-colleague Mike Fourie for raising the question.)
Option 1: Manually in Visual Studio 2010 using Tools » Options:

Option 2: Using a registry key

Download .REG file: DisableAutoCheckForUpdates.reg (.ZIP)
(Thanks to Robert MacLean for this tip and both screenshots.)
Scenario
You want to install and run TFS Build Controller and Agent on a separate network/domain than your Team Foundation Server 2010.
Disclaimer:
According to Ruiz from the MSDN Subscriber Support in Forum this is not officially supported.
How to solve:
- Install Team Foundation Build 2010 from TFS media.
- Apply latest updates (e.g. Service Pack 1, Cumulative Update 1).
- Create user account (both locally on the Build server as well as your TFS AT) as the service account for Team Build (e.g. TFSBUILD)
- On TFS, add service account TFSBUILD to Project Collection Build Service Accounts security group (on the collection-level)
- Configure the Build Server: when asked leave the "team project collection" field blank.
- Choose any system account for now.
- After configuration has completed, open the Build Service properties and set the service account to your local account (e.g. ".\TFSBUILD")
- Done. You can now start the Build Service, define a Build Controller and Build Agents.
More Information:
(Thanks to Wes MacDonald and Etienne Tremblay to guide me through this.)
Additional note from Wes:
The other thing I should mention is we had to have the build agent hostname defined in the HOSTS file on the TFS Application Tier and the TFS Server hostname defined in the Build Agent HOSTS file. This assumes the DNS is not configured with the entries.
Problem description:
Visual Studio (VS) Service Pack (SP) 1 fails with an
"Generic Trust Failure".
Cause:
Probably the .ISO file is corrupt.
How to fix:
You can try to re-download the .ISO file or use the VS SP1 Web Installer (which downloads only the required patches itself) and re-apply the patch, when asked to chose between re-apply and uninstall.
More Information:
The .ISO file has the following checksums (according to Heath Stewart's blog post):
- SHA1: 61C2088850185EDE8E18001D1EF3E6D12DAA5692
- CRC: C77C2A14
Updated (Sept 3rd, 2011) to include link to checksum of .ISO file. (Thanks to Ahmed Ilyas)
To recycle the TFS app pool, just run:
%windir%\system32\inetsrv\appcmd recycle apppool /apppool.name:"Microsoft Team Foundation Server Application Pool"
Note: Requires admin priviledges (run as admin).
This will also pick up new settings from the TFS registry.
(Source: Grant Holliday and MSDN Library.)
Question: How can I easily see if VS SP1 is installed on my machine?
Answer: Run VS 2010, open Help » About. Look for "SP1Rel" after the version number.
Screenshot:


Shipping as part of Team Foundation Server 2010:
- Builds – Requires that build breaks that were created during a build must be fixed before a new check-in.
- Code Analysis – Requires that code analysis is run before check-in. [More]
- Testing Policy – Requires that check-in tests are completed before check-in.
- Work Items – Requires that one or more work items be associated with the check- in.
Supplied by the TFS 2010 Power Tools (needs to be installed on all VS clients):
- Changeset Comments Policy – Requires users to provide check-in comments.
- Custom Path Policy – Allows you to scope other check-in policies to specific folders or file types.
- Forbidden Patterns Policy – Prevents users from checking in files with filenames that contain forbidden characters or patterns.
- Work Item Query Policy – Requires that the associated work items need to be part of the result of a specified work item query.
Note: When using an older version of VS (2005/2008) you need to install the corresponding version of the TFS Power Tools (VS 2005 requires 2005 Power Tools, etc.)
Developed by the Community:
But what about the "Override policy" checkbox?

Further reading:
Do you know another great check-in policy for TFS 2010? Let me know!
Updates:
More Posts
Next page »