Visual Studio ALM Blog

by Jahangeer

  Home  |   Contact  |   Syndication    |   Login
  21 Posts | 0 Stories | 68 Comments | 0 Trackbacks

News

Archives

Post Categories

Saturday, April 23, 2011 #

In TFS2008, deleting a build removes it from the database itself. If you delete a build called Build_20110423.1 or 1.0.0.1 from Build Explorer and trigger the build again then you will see that new builds starts with same number (Build_20110423.1 or 1.0.0.1) but not with an incremental number (Build_20110423.2 or 1.0.0.2). But, it doesn’t work the same way in TFS2010.

I queued a build in TFS2010 which got failed with Build Number 1.0.14.0 due to compilation errors.

buildnumber1

I wanted to reuse the same build number. So, I have deleted the Build from Build Explorer by checking all the available options.

buildnumber2

Triggered the Build again but it got failed with error TF42064: The build number ‘1.0.14.0’ already exists for build definitionSmile.

buildnumber3

This is because in TFS2010 when you delete the builds, it only gets marked as deleted in the database so that it doesn’t show up in the UI anymore. To get rid of this build completely you actually have to Destroy it using tfsbuild destroy command which is added in TFS2010.

Open the Visual Studio Command Prompt and you can run the tfsbuild destroy command in below mentioned syntax.

C:\WINDOWS\system32>tfsbuild destroy /collection:http://TFSServer:8080/tfs/defaultcollection /builddefinition:"TeamProject\BuildDefinitionName" BuildNumber 1.0.14.0

No builds found for build specification 'BuildNumber'.
Destroy build record for 1.0.14.0 permanently? (Yes/No/All) yes
Destroying 1.0.14.0... Done

I queued the build again and now the build succeeded with 1.0.14.0 Build Number.

buildnumber5


Saturday, March 19, 2011 #

Introducing the concept of “first class branches” is a significant improvement as part of the 2010 release with respect to version control.  Not only does it help to distinguish between folders and branches, but it enables branch visualizations. Let us see improvements in detail.

·         In TFS2008, you don’t know which of the folders are Branches: All folders looks the same, all have the folder icon.

Now, In TFS 2010 there is a new icon that shows which of the folder is a Branch.

      ·      There is no visual means to manage branches in TFS2008:   You dont have any means to identify which branches are related and the relation type. Now, In TFS 2010 you have visual tools to see the Branches Hierarchy.

In order to see a Branch Hierarchy just Right Click the Branch and choose: Branching and Merging –> View Hierarchy

  

 ·         In TFS2008, there is no option to track changes path between the Branches:  If you have made a merge in a Branch you can’t track from which Branch this Merge came from. Now, you have the tools that shows the path of change between the Branches, you can also see where change was added on a timeline. 
In order to track a change do the following:
Step1: Right click the Branch and click View History
 

Step 2: Choose a changeset to track and click the “Track Changeset” button.

 
 

Step 3: Choose the branches that will be in the view and click “Visualize”.

In above visual, you can see that Changesets 108,109,110 and 119 where merged from Main to Release1.0 Branch and then “Release_1.0” Branched to “Dev1.0.

Step4: You can also see the Merges on a Timeline by clicking on the “Timeline Tracking” button.

 

Creating New Branches:

In TFS 2010, the creation of branches has been streamlined a bit from the process in 2008.  In 2008, creating a new branch was like every other action in the system – changes were pended on the client, and then checked in to the server. Because of this creating new branch in TFS2008 was time-consuming process.  In TFS2010, the step where changes are pended has been bypassed and now performing the branch creation is entirely on the server.  With this approach, the round trip time for downloading a copy of each file on the branch and then uploading each file again has been eliminated. 

Note: In TFS2010, the new branch will be created and committed as a single operation on the server. Pending changes will not be created, it doesn’t require a check-in as it will be carried out as a single operation and it’s not possible to cancel.

 
 

Manage Branch Permissions:

The properties view for branches is also different than that of ordinary folders or file, containing some metadata for the branch, relationship information, and permissions for the branch.

In TFS2008, the users who have checkout and Check-in permissions can create a branch. But, In TFS2010 you can control the permissions for Branches using Manage Branch permissions.

 

Reparent option in TFS2010:

In TFS2008, if we have two branches which don’t have parent-child relation and we want perform merge between these two branches then we have to perform baseless merge using tf.exe command line. I have two branches Release_1.0 and Dev1.0_F2 which don’t have any relation between them, that’s why when I click on merge option in Release_1.0, in Target Branch it’s not showing Dev1.0_F2 branch to perform the merges.

 

 

Let us see what can we do for this in TFS2010, first perform a TFS baseless merge to establish a relationship between the parent branch and the child branches.  It will only merge the folder, not its contents.

TFS baseless merges are performed via the command line using VS2010 command prompt and do the following:

 

tf merge /baseless <ParentBranch> <childBranch>

Check in your pending changes.

It will create the link between the branches but the relationships are still not completed. 

Now, select the child branch in Source Control Explorer and from the File menu choose Source Control –> Branching and Merging –> Reparent.

  

 
In the dialog box,  choose the appropriate branch as the new parent.
 

Click Reparent and then go to parent branch and click merge. Now, will see that in Target Branch option Dev1.0_F2 branch is added.

 
 
 
 

Converting Folders to Branches and Branches to Folders:

You can convert any Folder as Branch from Context Menu by performing right click on the folderàBranching and MergingàConvert to Branch.

In similar way, you can convert the Branches to Folder using Convert to Folder option available in File Menu (FileàSource ControlàBranching and MergingàConvert to Branch). This option is not available in context menu.

 
 
 
 
 

 


Tuesday, February 22, 2011 #

When customizing the Build Process Template in Workflow designer, I came across the OutOfMemoryException errors while performing Save as Image and Copy operations:

"Insufficient memory to continue execution of program"


 

There is a fix available on Microsoft Connect  which has resolved the issue.


Saturday, January 15, 2011 #

I ran into this problem few days back, I was not able to run the builds because the Build Controller was showing Status as Unavailable.

It was showing the below exception:

There was no endpoint listening at http://fullmachinename:9191/Build/v3.0/Services/Controller/2 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

After trying out few things, I looked at below Build Service Properties.

 

Then, I did below modifications to the Build Services Properties:

1)      Changed the Local Build Service Endpoint(incoming) from

http://machinename.domain.com:9191 to http://machinename:9191

2)      Changed the Connect to Team Project Collection (outgoing) from localhost to machine name. http://localhost:8080/tfs/defaultCollection to http://machinename:8080/tfs/DefaultCollection

 

After that Started the Build Services and it fixed the issue, the Build Controller was showing Available Status and was able to run the builds.


Last few weeks, I have been working on Application Packaging stuff using all the widely used tools like InstallShield, WISE, WiX and Visual Studio Installer. So, I thought it would be good to post about how to Build the Installers developed using these tools with Team Build 2010. This post will focus on how to build the InstallShield generated packages using Team Build 2010. For the release of VS2010, Microsoft has partnered with Flexera who are the makers of InstallShield to create InstallShield Limited Edition, especially for the customers of Visual Studio.

First Microsoft planned to release WiX (Windows Installer Xml) with VS2010, but later Microsoft dropped  WiX from VS2010 due to reasons which are best known to them and partnered with InstallShield for Limited Edition. It disappointed lot of people because InstallShield Limited Edition provides only few features of InstallShield and it may not feasable to build complex installer packages using this and it also requires License, where as WiX is an open source with no license costs and it has proved efficient in building most complex packages.

Only the last three features are available in InstallShield Limited Edition from the total features offered by InstallShield as shown in below list. 

                                                                                         
Feature
Limited Edition for Visual Studio 2010
Standalone Build System
Maintain a clean build machine by using only the part of InstallShield that compiles the installations.
InstallShield Best Practices Validation Suite
Avoid common installation issues.
Try and Die Functionality
RCreate a fully functional trial version of your product.
InstallShield Repackager
Create Windows Installer setups from any legacy installation.
Multilingual Support
Present installation text in up to 35 languages.
Microsoft App-V™ Support
Deploy your applications as App-V virtual packages that run without conflict.
Industry-Standard InstallScript
Achieve maximum flexibility in your installations.
Dialog Editor
Modify the layout of existing end-user dialogs, create new custom dialogs, and more.
Patch Creation
Build updates and patches for your products.
Setup Prerequisite Editor
Easily control prerequisite restart behavior and source locations.
String Editor View
Control the localizable text strings displayed at run time with this spreadsheet-like table.
Text File Changes View
Configure search-and-replace actions for content in text files to be modified at run time.
Virtual Machine Detection
Block your installations from running on virtual machines.
Unicode Support
Improve multi-language installation development.
Support for 64-Bit COM Extraction
Extract COM data from a 64-bit COM server.
Windows Installer Installation Chaining
Add MSI packages to your main installation and chain them together.
XML Support
Save time by quickly testing XML configuration changes to installation projects.
Billboard Support for Custom Branding
Display Adobe Flash billboards and other graphic files during the install process.
SaaS Support (IIS 7 and SSL Technologies)
Easily deploy Windows-based Web applications.
Project Assistant
Jumpstart a project by using a simplified set of views.
Support for Digital Signatures
Save time by digitally signing all your files at build time.
Easily Run Custom Actions
Schedule a custom action to run at precisely the right moment in your installation.
Installation Prerequisites
Check for and install prerequisites before your installation is executed.

To create a InstallShield project in Visual Studio and Build it using Team Build 2010, first you have to add the InstallShield Project template  to your Solution file. If you want to use InstallShield Limited edition you can add it from FileàNewà project àother Project Types àSetup and Deploymentà InstallShield LE and if you are using other versions of InstallShield, then you have to add it from  from FileàNewà project àInstallShield Projects.

Here, I’m using  InstallShield 2011 Premier edition as I already have it Installed. I have created a simple package for TailSpin Application which has a Feature called Web, few components and a IIS Web Site for  TailSpin application.

 

Before started working on this, I thought I may need to build the package by calling invoke process activity in build process template or have to create a new custom activity. But, it got build without any changes to build process template. But, it was failing with below error message.

C:\Program Files (x86)\MSBuild\InstallShield\2011\InstallShield.targets (68): The "InstallShield.Tasks.InstallShield" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\InstallShield\2010Limited\InstallShield.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files(x86)\MSBuild\InstallShield\2011\InstallShield.Tasks.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

This error is due to 64-bit build machine which I’m using. This issue will be replicable if you are queuing a build on a 64-bit build machine.

To avoid this you have to ensure that you configured the build definition for your InstallShield project to load the InstallShield.Tasks.dll file (which is a 32-bit file); otherwise, you will encounter this build error informing you that the InstallShield.Tasks.dll file could not be loaded. To select the 32-bit version of MSBuild, click the Process tab of your build definition in Team Explorer. Then, under the Advanced node, find the MSBuild Platform setting, and select x86. Note that if you are using a 32-bit build machine, you can select either Auto or x86 for the MSBuild Platform setting.

 


Sunday, August 08, 2010 #

Test Scribe is a tool for generating documentation about TCM (Test Case Management) artifacts. Testers can use a stand-alone client to connect to a TFS 2010 server/project. With a Test Plan selected, users are able to generate a Test Plan Document, including information about the plan, the suite hierarchy, and each test case contained in the suites.

 

You can download the Test Scribe from Visual Studio Gallery here: http://visualstudiogallery.msdn.microsoft.com/en-us/e79e4a0f-f670-47c2-9b8a-3b6f664bf4ae

Once you install this tool, open the Microsoft Test Manager and you will notice that there is a new drop down added to MTM called Tools.

It provides two tabs, one is Test Plan Summary and another is Test Run Summary. You have to select Test Plans or Test Run and when you click on Generate button, it will export the Test Plan and Test Run Summary details into a word document.

Test Plan Summary:  Test Plan provides the details about Test Plan Status, Available Configurations, Test Suites, Test Suites Hierarchy, Test Cases and also the available Test Steps in each Test Case.

 
  

Test Run Summary: It provides details about outcome of the Test Runs, how many Test Cases have been executed in each Test Run and how many Test Cases are successfully completed or failed.


 

 


Search Work Items Extension for TFS2010 has been released and it’s available for download on Visual Studio gallery. To use this Extension the user should have Visual Studio 2010 and Team Explorer 2010 installed.

This extension can be downloaded here: http://visualstudiogallery.msdn.microsoft.com/en-us/3f31bfff-5ecb-4e05-8356-04815851b8e7

Searching for work items with queries inside Visual Studio sometimes  becomes a pain and using this add- in you can filter the Work Items using  one little search box in the IDE.  It allows you to enter some text in, hit the enter key, and it would bring out  the list of results of work items that matches with the text entered.

The default search fields are Title, History, and Description. If you want to modify which work item fields are searchable, type in "--template" (no quotes) into the search box and hit enter. This will open the search template. Just add another "Or" statement, pick the field name, select an operator, type "[search]" (no quotes) in the value field, and hit ctrl + s to save. The next time you run a search it will use the modified search template.


Sunday, July 25, 2010 #

 

Microsoft has recently released Visual Studio Scrum 1.0 Process Template, this template has been designed to support the Scrum Teams working with TFS.

Scrum is an iterative, incremental framework for project management and agile software development. This template includes work items and reports to help Scrum teams to be successful.  

First let me give an overview on Scrum Roles & Scrum Contents, so that it will be easy to understand the Scrum Process Template.

o   Scrum Master: He is the one who will be responsible for ensuring the process is understood and followed.


o   Scrum Team: which does the work. The Team consists of developers with all the skills to turn the Product Owner’s requirements into a potentially releasable piece of the product by the end of the Sprint.


o   Sprint Retrospective: It is used to review the past Sprint and determine what adaptations will make the next Sprint more productive, fulfilling, and enjoyable.


o   Product Owner: who is responsible for maximizing the value of the work that the Scrum Team.

  

o   Sprint: A Sprint is an iteration. Sprints are time-boxed. During the Sprint, the ScrumMaster ensures that no changes are made that would affect the Sprint Goal. Both Team composition and quality goals remain constant throughout the Sprint. Sprints contain and consist of the Sprint Planning meeting, the development work, the Sprint Review, and the Sprint Retrospective. Sprints occur one after another, with no time in between Sprints.

Visual Studio Scrum 1.0 Process Template includes:

Work Item Types

  • Sprint :  By defining and managing sprint work items, team can capture the goal, the start and end dates, and the retrospective results for each sprint in a project. During a sprint planning meeting, team determines the sprint goal and the number of product backlog items that team members can accomplish over the upcoming sprint. Scrum Master makes sure that the sprint goal remains constant throughout the sprint. At the end of each sprint, team discusses what went well and what did not go well during the sprint and then decides what team members can do differently to make the next sprint more effective.
  • Product Backlog Item : The requirements for the product that the Team is developing are listed in the Product Backlog.  By defining and managing product backlog items, teams capture the requirements of the product. The Product Owner is responsible for the Product Backlog, he is the one who defines defines, prioritizes, and maintains backlog items. The Product Backlog represents everything necessary to develop and launch a successful product. It is a list of all features, functions, technologies, enhancements, and bug fixes that constitute the changes that will be made to the product for future releases. The team estimates the effort, the business value and the priority for each backlog item and delivers the highest priority items in each sprint.
  • Bug:  By defining and managing bug work items, team can track defects in the product and prioritize efforts to resolve them. When you define a bug, you should perform the following tasks
  • Task : By defining and managing task work items, team can track and report on the detailed work that it must accomplish for a product backlog. Teams typically forecast work and define tasks at the start of each sprint, and each team member performs a subset of those tasks. Tasks can include development, testing, and other kinds of work. For example, a developer can define tasks to implement product backlog items, and a tester can define tasks to write and run test cases.
  • Impediment : By defining and managing impediment work items, team can identify and track problems that prevent it from completing tasks efficiently. Teams typically identify impediments during daily scrums. The scrum master is responsible for helping resolve these impediments and improve team productivity.
  • Test Case: A team uses test cases to define both manual and automated tests that can be run and managed by using Microsoft Test Manager. By using Microsoft Test Manager, you can create not only test cases but also test suites and test configurations that support testing your project. You can use test configurations to define how you want to run your test cases and test suites. You can group your test cases together by organizing them into a hierarchy of test suites in your test plan. By creating test suites, you can run sets of test cases as a group.
  • Shared Steps: Your team can use shared steps to streamline definition and maintenance of manual test cases. Many tests require the same sequence of steps to be performed for multiple test cases. By creating shared steps, you can define a sequence of steps once and insert it into many test cases. For example, if each test case requires a tester to log on to the application, you can create a set of shared steps to perform these actions. You can then add the shared steps to each test case and run the steps using Test Runner.

Reports:      

o   Release Burndown: By reviewing a release burndown report, you can understand how quickly your team has delivered backlog items and track how much work the team must still perform to complete a product release.

o   Velocity: If your team has completed multiple sprints, you can forecast release and product completion dates and plan future projects more accurately by reviewing the velocity report.

o   Sprint Burndown:  By reviewing a sprint burndown report, you can track how much work remains in a sprint backlog, understand how quickly your team has completed tasks, and predict when your team will achieve the goal or goals of the sprint.

o   Build Success Over Time: The Build Success Over Time report provides a pictorial version of the Build Summary report. The Build Success Over Time report displays the status of the last build for each build category run for each day. You can use this report to help track the quality of the code that the team is checking in. In addition, for any day on which a build ran, you can view the Build Summary for that day.

o   Build Summary: The Build Summary lists builds and provides information about test results, test coverage, code churn, and quality notes for each build.

o   Test Case Readiness: After the team starts to define test cases, you can use the Test Case Readiness report to determine how many test cases have been defined and are ready to run.

o   Test Plan Progress: After the team creates test plans and starts to run tests by using Microsoft Test Manager, you can use the Test Plan Progress report to track the team's progress in testing the product.

 

 

 

 


Thursday, July 15, 2010 #

For Visual Studio 2003 there is no Team Explorer option available, you will need the MSSCCI provider to be able to connect to TFS 2010. You can find the MSSCCI provider for TFS2010 in the Visual Studio Gallery at:

http://visualstudiogallery.msdn.microsoft.com/en-us/bce06506-be38-47a1-9f29-d3937d3d88d6


If you want to connect to TFS 2010 Server using Visual Studio 2005 Client, then you need to Install the below components in mentioned order. The Installation order is really important to make it work.

- Install Visual Studio 2005
- Download and install Team Explorer 2005
- Download and install Visual Studio 2005 SP1
- Download and install VSTS 2005 Forward Compatibility Update

If you  want to apply Team Explorer 2005 to connect TFS2010 on the machine that has VS2005 SP1 installed, please try the following steps in order:

- Download and install Team Explorer 2005
- Re-apply Visual Studio 2005 SP1 to upgrade Team Explorer 2005 to SP1
- Download and install VSTS 2005 Forward Compatibility Update

As TFS2010 introduces the notion of Team Project Collections. After the installation is completed successfully, you should provide the entire URL to connect TFS2010 server.
You can express the connection string as follows:

http://<serverName>:<port>/<vdir>/<collectionName> (e.g. http://TfsServer:8080/Tfs/ProjectCollectionName)

The <vdir> is an optional path for the TFS web sites specified by the administrator during setup. By default it is “tfs”.