Archive

Posts Tagged ‘TFS Service’

Migrate your Visual Studio Online to On-Premises TFS


For a limited time, you can move your Visual Studio Online to on-premises TFS. This feature is turned OFF by default and you need to contact VSOExportSupport@Microsoft.com to turn it on. You also need to upgrade your on-premises TFS to Update 2.  

Microsoft has published step by step article on how to prepare you on-premises environment, export your projects, and import them

http://msdn.microsoft.com/en-us/library/7cb80f0d-0119-4277-82e8-719a8db1796e

 

 

TFS2012: Run Concurrent Sprints


This post is in response to the following forum question http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/thread/9b9c6479-34f8-427f-b461-09f8b6a3c8f9

In the post, I will show how to show two backlogs for a Release 1 and Release 2. Backlogs will NOT be visible at the same time.

Open TFS Web Access

Click on Configure Schedule and iterations

image

I have two releases two sprints in two different releases. In real case scenario, a later Sprint than Sprint 1 will be the current Sprint for Release 1

image

Click Set as team’s backlog iteration for Release one to show workitems assigned to Release 1 in the backlog

image

Close the popup

Click on View backlog

image

Notice that you can only see the backlog items assigned to Release 1

One of the issues you will have is when you view the backlog, the Iteration path is not one of the visible columns. It is useful to show the Iteration Path in the grid. Click on Column Options and add the Iteration Path from the left rest to the right one.

image

To show the backlog for Release 2. Click the home button and click on the configure schedule and iterations. You can select Release 2 now.

image

Make sure you check Sprint 1

image

In the steps, I will be adding a workitem query to the team favorites to show the number of the workitems assigned to a Release. Go to the Work tab then Work Items. lick on the Product backlog. Click on the editor tab then modify the iteration path then click on the Save as Query button. I am calling it PBL-Release1.

image

Create another query for Release 2.

Click on the little triangle next to the the new queries and add them to the team favorites

image

Notice that the queries got copied to the team favorites section

image

Go to the home page and notice the new tiles

image

Categories: ALM, TFS2012 Tags: , , ,

TFS2012: Schedule a One Time Team Build–Approach 1


In response to the questions asked on MSDN social, I am writing this blog post. The question was “How to schedule a one off build”. I also posted an alternative approach here

Introduction

When creating a scheduled build, you need to specify the the day of week and time.

image

But what if you only want to schedule it to run once? That scenario is not supported by TFS out of the box.

Solution

One of the solutions I am proposing in this post is to create a scheduled build definition and a custom activity to reset the build definition trigger to manual when the build is complete. The limitation for this approach is you can’t specify a date (e.g. 22/1/2013). In other words, you can only schedule it for the next 7 days.

I am using TFS2012 and Visual Studio 2012 for this solution. You can still use the same steps for TFS 2010.

Creating Build Activity

Create new project of type Activity Library and name it TeamBuildActivities

image

Delete Activity1.xaml

image

Add new item of type Code Activity and name it SetTeamBuildDefinitionTriggerToManual

image

image

Add a reference to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Build.Client.dll

Paste the following code in the SetTeamBuildDefinitionTriggerToManual .cs file


using System.Activities;
using System.ComponentModel;
using Microsoft.TeamFoundation.Build.Client;

namespace TeamBuildActivities
{
[BuildActivity(HostEnvironmentOption.All)]
public sealed class SetTeamBuildDefinitionTriggerToManual : CodeActivity
{

[Browsable(true)]
[DefaultValue(null)]
public InArgument<IBuildDetail> BuildDetail { get; set; }

// If your activity returns a value, derive from CodeActivity<TResult>
// and return the value from the Execute method.
protected override void Execute(CodeActivityContext context)
{
if (BuildDetail == null)
{
return;
}
IBuildDetail buildDetail = context.GetValue(BuildDetail);

if (buildDetail == null)
{
return;
}

buildDetail.BuildDefinition.TriggerType = DefinitionTriggerType.None;
buildDetail.BuildDefinition.Save();

}
}
}

Save and build the project

Copy the output assembly TeamBuildActivities.dll to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies

Create a build definition

Create your build definition with a scheduled trigger

image

On the process, click show detail and then the new button

image

You should rename the New file name, I am keeping the default name in this example

Click OK

Open the Source Control Window

Right click on the new build process template and get latest

image

Double click on the new build process template to open

Open the Toolbox window

Create a new Tab and call it Custom Activities

Right click on the custom activity area and select Choose Items

image

Make sure that System.Activities Components Tab is selected

Click on the browse button

Go to the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies folder and select the TeamBuildActivities.dll and click OK

image

Drag and drop the activity at the end of the workflow

image

Type in the BuildDetail argument into the BuildDetail property grid

image

Save workflow template and then check it in

image

Create new Folder in TFS Source Control for Build Activities

Go to the Source Control Windows

Create new folder, I am naming it TeamBuildAssemblies

image

Open the local folder and copy TeamBuildActivities.dll to it

image

Go back to source control

Right click on the folder you created and select Add Items to folder

image

Select TeamBuildActivities.dll from the window

image

Check in the folder

image

Point Controller to the TeamBuildAssemblies

At this point, we want the team build to load the custom activity we created to initiate an  instance of the SetTeamBuildDefinitionTriggerToManual activity

Click on Actions

Then Manage Build Controllers

image

Click on Properties

Select the path for the TeamBuildAssembles folder

image

Click OK

Queue a Build

Lets queue a build to simulate the running of a scheduled build

You may get the following error

TF215106: Access denied. NT AUTHORITY\NETWORK SERVICE needs Edit build definition permissions for build definition TeamBuildActivities in team project MyTeamProject to perform the action

image

To fix the error you need to give  “Edit build definition” permission to the build account

Right click on the team build definition

Select Security

image

Select Build Service Accounts

Change the value for Edit build definition to allow

SCROLL DOWN AND CLICK SAVE CHANGES. For low resolution screens this may not be so intuitive because the button is hidden

image

Now queue another build

image

Edit the build definition and click on the Trigger tab

image

Notice that it is switched to Manual

TFS 2012: Comparison of Team Foundation Server’s Editions


About TFS Blog Series

This blog post is part of a blog series to introduce Team Foundation Server to new users. The blog series will also contain articles targeting intermediate and expert users.  I will be using Team Foundation Server 2012 Update 1 and Visual Studio 2012 Update 1 throughout the series. If you have any questions or you want me to cover a specific topic, please don’t hesitate to contact me.

Expertise Level

Intermediate

Getting Started with Team Foundation Server

TFS comes in three flavours:

  • Team Foundation Server Service (tfs.VisualStudio.com)
  • Team Foundation Server Express
  • Team foundation Server

Choosing which flavour you need depends pretty much on your requirements. In this article I will shed light on each version and why you want to choose one vs the other.

Introducing Team Foundation Server’s Editions

Team Foundation Server Service

TFS Service is the cloud or the hosted version of the TFS. It is currently offered for free and supports up to 5 team users. Microsoft will disclose pricing for other plans in 2013. Microsoft has announced that a Free Plan will be offered. Microsoft will offer away to transition from the free service to the paid service when such a service is announced.

At the time of writing this article, the announced Free Plan includes:

  • Up to 5 users
  • Unlimited number of projects
  • Version control
  • Work item tracking (To manage Sprints, Storyboard, Tasks, Bugs, ..etc)
  • Agile planning tools (Backlog, Kanban and task boards, Sprint schedule,
  • Feedback management (Mechanism to get feedback from stakeholders)
  • Team build support

Pro’s

The following is a list of advantages of TFS service compared to the other versions of TFS:

  • No installation required. Can be up and running in matters of minutes
  • Don’t require purchasing hardware or software to host the TFS
  • Data is stored in triplicate on three physically distinct servers
  • Full backups are done everyday and with hourly incremental backups
  • Service is accessible from anywhere around the world
  • TFS Service receives the new TFS updates and features, every 3 weeks, before other versions of TFS
  • No licensing required when using the express versions of Visual Studio or none Microsoft platforms such as Eclipse or Xcode
  • Scalable, you can scale out the team build by hosting the build service in your enterprise

Con’s

  • Paid version plans are not out yet
  • Free for upto 5 users
  • Lack of Active Directory support
  • Maybe slow when getting too many files from the server depending on your connection speed
  • Data is not inside your network
  • Can’t customize process template or workitem templates
  • No SharePoint portal
  • Doesn’t come with lab environment. Such environments must must be setup on physical or virtual machines (including Cloud)
  • Limited reports and can’t deploy custom reports. You can still use Excel to connect to the service and have your custom reports locally
  • Limited migration path from TFS on premise to TFS Service and vise versa

Team Foundation Server Express

TFS Express is a free limited version of Team Foundation Server. It is great for small teams of up to 5 five users. TFS Express can be downloaded from the MSDN website and it is around 500MB. Here is a direct link to the TFS Express home page.

Pro’s

  • Free
  • Data stays inside your network
  • Comes with version control repository
  • Work item tracking
  • Build Automation
  • You have more control compared to the TFS Service
  • Can customize Process and Workitems template
  • CAL’s can be purchased in case your team grows beyond 5 users
  • Support for express versions of Visual Studio

Con’s

  • Must have own hardware or virtual machine
  • Not accessible from anywhere
  • Supports Basic installation only
  • Limited Agile Project management features and tools
  • No Reporting Integration
  • No SharePoint Integration
  • Supports only SQL Server Express Edition
  • Installed on one machine. Can’t scale out
  • Doesn’t support TFS Proxy
  • Excludes Preemptive analytics add-on
  • Need to manage your own database backups and downtimes in case of hardware failure
  • Buy license for the Operating System and CALs if required

Team Foundation Server

This is the full version of TFS. It has no limitations and supports more integration and configuration scenarios. You can buy TFS from the Microsoft Store or one of the Microsoft’s resellers or you could already have a license to use it if you have certain MSDN subscriptions. To read more about licensing, please check the MSDN website or click here to read the licensing white paper.

Pro’s

  • Full integration with many products such as SharePoint and reporting services
  • Supports higher end versions of SQL Server for the backend as well as Express version
  • Supports the express versions of Visual Studio and other Non-Microsoft products (CAL may be required)
  • CAL License is included with certain Visual Studio MSDN subscriptions (Professional, Premium and Ultimate)

Con’s

  • Must have own hardware and/or virtual machines
  • Need to install and configure
  • Make sure that all required CALs are purchased
  • Could be pricy for small teams
  • Not accessible from anywhere

Conclusion

For large and restrictive companies the full edition of TFS would probably be the best option because the data is stored in house, server can be scaled out, supports higher end database editions (standard and enterprise) and can integrate with SharePoint. It all comes with a cost depending on your team size and the number of servers and licenses needed for scaling out the server. But, if your development team(s) already have Visual Studio MSDN subscription, then your company may get a relief on CALs.

For smaller size teams of 5 users or less, it comes down to how much control you need to have over your data and the ability to customize process template and work item templates vs better Agile process and broader availability. If you are interested in the first scenario, TFS Express would be a better option, otherwise you are better off using TFS Service. In case your team can afford the full edition of TFS or your team already have Visual Studio MSDN subscription, you may want to take advantage of full version of TFS. There are programs offered by Microsoft for small businesses such as BizSpark. Check with your local Microsoft office, you may qualify for other offers.

For teams larger than 5 users, you want to calculate how many CALs you need and how much you are paying for them and is it worth it to upgrade to Full Version of TFS.

My conclusion is based on the state of TFS Service as of January 7, 2012 which was explained above.

 

About Lajak Technologies

A consulting firm in Ottawa, Ontario that provides services related to Microsoft technologies, Team Foundation Server, DevOps practices, security and more. Contact us today to help you solving your complex software problems. Visit us at http://www.lajak.com.

Scale out Team Foundation Service Build Server

December 13, 2012 1 comment

Overview

Some Visual Studio projects hosted on tfs.VisualStudio.com (formally known as tfsPreview) require specific build environment or the installation of extra components for the build to succeed. For instance, building Windows store projects requires the build server machine to have Windows 8 operating system and Visual Studio to be installed, building a BizTalk project requires the BizTalk SDK to be installed on the build servers, building Lightswitch applications with extensions requires Visual Studio and the extensions to be installed on the build servers and the list goes on.

In this article, I will setup an on premise Build Server to build Windows Store applications that are hosted in tfs.VisualStudio.com. This article assumes you already have an account with tfs.VisualStudio.com and already have a physical machine or VM with Windows 8 as an operating system and Visual Studio 2012 Express for Windows 8 or higher.

Problem

In this article, I have a Windows Store application named “MyWindowsStoreApplication” which is checked in to tfs.VisualStudio.com. Building the MyWindowsStoreApplication using the “Hosted Build Controller” and agent will fail to build as shown in the following figure

image

The TFS Build fails with the error indicating that Windows 8 operating system is required to package the built Windows Store application.

Solution

The solution for the problem is to scale out TFS Server’s Build capabilities and host a TFS Build Controller and Build Agent on a computer or VM that has Windows 8 as an operating system.

Prerequisites

The system requirements to build Windows Store applications are:

  • Windows 8 Operating System
  • Visual Studio 2012 for Windows 8 or higher

Installing TFS Controller and Build Agents

In the following section we will go through the steps needed to create a TFS Build Controller and Build Agents on a local server for the tfs.VisualStudio.com source code repository.

image

The assumption is that you already have a physical machine or VM that has a Windows 8 operating system and Visual Studio 2012 installed.

The following are the step by step instructions to scale out Tfs.VisualStudio.com build server:

  • Insert the TFS2012 DVD or extract the iso file
  • Execute tfs_server.exe on the root folder, if you are using TFS Express, you need to execute tfs_express.exe

image

  • Accept the license terms for Team Foundation Server
  • Click the Install Now button

image

  • When the installation is complete, the Team Foundation Server Configuration Center is launched
  • Select the Configure Team Foundation Build Service from the list
  • Click the Start Wizard button

image

  • Click Next in the Build Service Configuration Wizard to move from the Welcome screen to the Project Collection screen

image

  • Click on the Browse button on the Project Collection screen
  • Click the Servers button on the Connect to Team Project Collection dialog
  • Click the Add button on the Add/Remove Team Foundation Server Dialog
  • Type the name or URL of your team foundation server and select the HTTPS protocol
  • Click the OK button

image

  • Once the OK button is clicked, the Sign in to Team Foundation Server window will be launched
  • Enter your tfs.VisualStudio.com email address and password
  • Click the Sign in button

image

  • Your Team Foundation Server should show up in the Connect to Team Project Collection dialog
  • Click the Connect button

image

  • Now we are back to the Build Service Configuration Wizard, in my case, I haven’t configured on premise TFS build controllers or agent before. Hence, I am getting the Found 0 build controllers and 0 build agents message
  • Click the next button image
  • On the Build Services screen, select Use the default setting. For illustration purposes, I kept the number of build agents to 2. The number of build agents allows to run multiple builds concurrently
  • Click the Next button

image

  • On the Settings screen, the default option is Use a system account option is selected. The Local Service account is selected by default if the machine is not part of a domain. Network Service account is selected by default if the machine is part of a domain
  • Click the Next button

image

Review the settings and click the Verify button to verify the settings

image

Click the Configure button

image

If the configuration is complete successfully, click on the Next button and then close the Team Foundation Build Service Configuration window

image

image

  • Back at the Team Foundation Server Configuration Center, you should see a green check mark which indicates that the service is configured
  • Close the dialog if you don’t want to configure other sections

image

  • Open the Team Foundation Server Administration Console
  • Click on the Build Configuration node
  • Notice that the controller and the Agents are in a healthy state and enabled (green icon). A red error icon would show up instead in the case the controller or the agents are disabled

image

Modify Build Definition

  • Open Visual Studio on your development machine
  • Open Team Explorer window
  • Click on the Build link

image

  • Right click on the build definition that builds your Windows Store application
  • Click on Edit Build Definition

image

  • Click on the Build Defaults tab
  • From the Build controller combo box select the build controller created in the previous section

image

  • Click Save
  • On the Team Explorer window, right click on the build definition
  • Click on Queue New Build

image

  • The build should pass if you don’t have any build errors

image