“Developers don’t have to be full-stack but teams should be.”

“One common way I’ve seen this layering lead organizations astray is the AntiPattern of separating development teams by these layers. This looks appealing because front-end and back-end development require different frameworks (or even languages) making it easy for developers to specialize in one or the other. Putting those people with common skills together supports skill sharing and allows the organization to treat the team as a provider of a single, well-delineated type of work. In the same way, putting all the database specialists together fits in with the common centralization of databases and schemas. But the rich interplay between these layers necessitates frequent swapping between them. This isn’t too hard when you have specialists in the same team who can casually collaborate, but team boundaries add considerable friction, as well as reducing an individual’s motivation to develop the important cross-layer understanding of a system. Worse, separating the layers into teams adds distance between developers and users. Developers don’t have to be full-stack (although that is laudable) but teams should be.
in http://martinfowler.com/bliki/PresentationDomainDataLayering.html

TFS Build failed using Git.

Setting up a new Build process using Git in TFS it’s easy but you can face some initial problems, specially if you have been using TFVC.

Problems like this:

Continuous Integration Build of branch-master (MyProduct)
Ran for 0 minutes (Default Controller – name), completed at Thu 04/09/2015 06:20 PM

Request Summary

Request 3788 John Doe Completed


Other Errors

1 error(s)
TF215097: An error occurred while initializing a build for build definition \MyProduct\mybranch-master: Exception Message: One or more errors occurred. (type AggregateException) Exception Stack Trace: at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.TeamFoundation.Build.Client.FileContainerHelper.GetFile(TfsTeamProjectCollection projectCollection, String itemPath, Stream outputStream) at Microsoft.TeamFoundation.Build.Client.FileContainerHelper.GetFileAsString(TfsTeamProjectCollection projectCollection, String itemPath) at Microsoft.TeamFoundation.Build.Client.ProcessTemplate.Download(String sourceGetVersion) at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary`2 dataContext) at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken) Inner Exception Details: Exception Message: VS30063: You are not authorized to access https://tfs.instance-domain. (type VssUnauthorizedException) Exception Stack Trace: at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__0.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Microsoft.VisualStudio.Services.WebApi.VssHttpRetryMessageHandler.<SendAsync>d__1.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Microsoft.VisualStudio.Services.WebApi.HttpClientExtensions.<DownloadFileFromTfsAsync>d__2.MoveNext()

Basically you just need to Download the template:

download template

And add the Build Template Process (for Git) to the source code repository branch – click New:

add template

TFS 2013 Build – Using AsConfigured and still be able to get UnitTest results in TFS

When defining a build in TFS 2013 using the default template for TFVC you can set the Output location for the build.

Build Output location

But when you set it to AsConfigured you have to change the default values of the Test sources spec setting to allow build to find the test libraries in the bin folders. Here’s an example on how to do it.

If the full path to the unit test libraries is:

E:\Builds\7\<TFS Team Project>\<Build Definition>\src\<Unit Test Project>\bin\Release\*test*.dll




Migrating On Premises TFS 2012 to Microsoft Azure IaaS and Upgrading to TFS 2013 – Part II

Back in Part I I explained the current scenario that we have regarding TFS. So the option was to migrate On Premises TFS 2012 to Microsoft Azure IaaS and upgrading to TFS 2013.

The plan was pretty simple:

I’ll not detail the steps of upgrading from TFS 2012 to TFS 2013 because you can find them at Migration Upgrade from TFS 2012 to TFS 2013 (With Reporting and SharePoint) and at Upgrading to Team Foundation Server 2013 – it’s a pretty straightforward process.

So instead, I’ll focus on the problems I faced during the migration.

My first problem was related with the challenges of downgrading from sql server enterprise edition to standard edition, although I was upgrading from SQL Server 2008 to 2012. This information was very helpfull and if you plan to downgrade databases from a sql server edition to another take some time to test the backup and restore process.

Renaming the Report Server was another problem I needed to solve. This post helped me lot and saved me some time. Migrating TFS to a new server, specially when using a non-default instance, can be a problem so be prepared to dedicate some time to it.

Finally, the TFS Reports had a problem (not because Report Server, neither lack of permissions / bad credentials) but because of the data warehouse and the measurements cube. After testing many possibilities the final solution (and the one that really worked) was creating a new database for the data warehouse (Tfs_Warehouse) and triggering the ProcessWarehouse service and ProcessAnalysisDatabase (take a look to TFS 2010 Warehouse & Reporting trouble shooting basics) manually. Note, this process may take a while depending on the size of each TeamProjectCollection.

So, in conclusion, TFS system is built on top of the following databases:

  • Tfs_Configuration
  • Tfs_<collection> for each Team Project Collection

You must ensure that this databases are not corrupt. The Tfs_Warehouse database and the Tfs_Analysis cube can be rebuilt with some hacks. The same applies for the report server databases. Ensuring that you can migrate this databases with sucess is half way down to make a TFS migration process successfull.

I couldn’t finish before making reference to A Five Part Series: Troubleshooting TFS and SQL Reporting \ Analysis Services. Despite I found it after the migration process, can be very useful for some scenarios.

Hope it helped! And good luck with your TFS migration!

Migrating On Premises TFS 2012 to Microsoft Azure IaaS and Upgrading to TFS 2013 – Part I

In the next posts I’ll explain a scenario that I had back in the company with TFS 2012 and how I proceed with the migration of infrastructure and upgrade to TFS 2013. I hope it might be a common scenario and that my plan can be of any help.


We had TFS 2012 installed on premises in a single server (Application Tier + Data Tier) integrated with the company’s Active Directory. The company has two geographically separated teams and the single server is with one of them. Because we couldn’t predict the growth of the users and the away team needed access to build server (same server), things started to become less than sufficient and required a migration at the infrastructure level. We also wanted to upgrade to TFS 2013 to benefit from the new features. So we faced (at least) 3 possibilities:

  1. Keep TFS on premises (same server or new server) and upgrade it to TFS 2013
  2. Move TFS to Microsoft Azure and upgrade it to TFS 2013
  3. Move to Visual Studio Online

Soon we concluded that keeping TFS on premises (1.) wouldn’t solve the external access problem and represented less flexibility if we needed future growth in, for example, build servers.

Moving to VS Online was a good option but it represented higher costs and less flexibility in the build definitions, etc.

So option 2. seamed the best solution, we could keep the AD integration and restricted access to servers, but allowing external teams to access build servers. On the other hand, we’ll have higher flexibility, because we could easily scale the AT and DT server in minutes, and so the HD storage.

In the Part II I’ll detail the migration plan.

070-496: Install Team Foundation Server, Configure the Application tier

Here are some notes about installation of TFS and configuration of the application tier.

The Installation and Administration Guides (http://examcr.am/10Ln5E4) have important content for the exam.

Taking a look to the System Requirements here’s some important notes:

  • All of the Operating Systems supported are 64-bits based;
  • Only SQL Server 2008 R2 and 2012 editions are supported;
  • Accounts required for installation – Reporting, Team Foundation Server, Team Foundation Build, Team Foundation Server Proxy, SharePoint Products, SQL Server;
  • The TFS setup will install IIS;
  • SharePoint Foundation 2010 can be installed manually or as part of the TFS installation, it doesn’t need to be in the same server as TFS, but if not installed in the same server it requires Extensions for Windows SharePoint Services on the server that is runnning SharePoint Products;
  • SharePoint Server 2010 Standard and Enterprise versions are supported, but Enterprise edition provides access to 5 extra dashboards.

Installation options considered in the exam: Advanced, Application-Tier only, Upgrading TFS from an earlier release of it, Build services installation, Proxy services installation.

Team Foundation Server Proxy does not provide scalability, but can save bandwidth by caching version control files at the remote location.

Exam Best Bets

  • Download and read the TFS Install and Administration guides http://examcr.am/10Ln5E4
  • Make sure you’re well aware of the system requirements
  • Make sure you’re familiar with multi-server installations
  • Make sure you are confident configuring integration with SharePoint and Reporting Services


Like previous versions, TFS 2012, supports upgrading from Visual Source Safe too, but this version comes with a wizard that simplifies much more the upgrading task.

Lab Management

Setting up environment templates – http://examcr.am/ZEzfgM
Installing and configuring test agents – http://examcr.am/11pcal8
installing and configuring System Center Virtual Machine Manager (basic Virtual Machine Manager installation) – http://examcr.am/ZCTOv3
Creating library shares or resource pools – http://examcr.am/ZCTOv3

Build Agents & Controllers

A Build Service can only be used by one Team Project Collection.
Tagging and binding a controller to a project collection – http://examcr.am/11Ng34t
Adding a build agent – http://examcr.am/15sFEUL

070-496: Administering Microsoft Visual Studio Team Foundation Server 2012

Starting the MCSD: Application Lifecycle Management, I’ll begin by doing the 070-496 exam. Here’s the study material that I’ll be using:

  • http://www.microsoft.com/learning/en-us/exam.aspx?ID=70-496
  • Professional Team Foundation Server 2012 (http://shop.oreilly.com/product/9781118314098.do)
  • http://www.microsoftvirtualacademy.com/training-courses/administering-visual-studio-tfs-2012-exam-496-jump-start

This exam is divided in four parts (about 48 questions):

  • Install and Configure Team Foundation Server – 25%
  • Manage Team Foundation Server – 26%
  • Customize Team Foundation Server – 24%
  • Administer Version Control – 25%