Geeks With Blogs

@jakobehn

News

Microsoft Community Contributor Award 2011


Jakob Ehn Visual Studio ALM MVP @Inmeta Crayon TFS
Creating a Build Definition using the TFS 2013 API
Almost four years ago I wrote a post on how to create a build definition programmatically using the TFS 2010 API. The code is partyl still valid, but since a lot of the information in a build definition is dependent on the build process template, the code in the blog does not work properly for the TFS 2013 default build templates. In addition, since the introduction of Git in TFS 2013, there are some other differences in how you create a build definition for a Git team project compared to a TFVC ......

Posted On Wednesday, January 15, 2014 9:55 PM

Getting started with InRelease and TFS 2013 Preview
As you probably already know, Microsoft recently acquired InRelease, a release management product build by InCycle software that integrates tightly with Team Foundation Server. This acquisition fills a huge gap in the Visual Studio ALM suite, letting customers handle the release management and automatic deployment of their solution. This is a crucial feature for enabling Continuous Deployment. In this post I will show you how to get started with using InRelease, by installing it and setting up your ......

Posted On Friday, August 23, 2013 3:35 PM

New Book: Pro Team Foundation Service
The last couple of months I have been working together with Mathias Olausson, Mattias Sköld and Joachim Rossberg on a new book project for Apress that has just been published. The book is called Pro Team Foundation Service and covers all aspects of working with Team Foundation Service, Microsoft's hosted version of Team Foundation Server in the cloud. I have mainly worked on the chapter related to automated build and continuous deployment, but also with some of the other chapters. It has been a quite ......

Posted On Monday, May 20, 2013 11:27 PM

Adding Fake Build Information in TFS 2010
We have been using TFS 2010 build for distributing a build in parallel on several agents, but where the actual compilation is done by a bunch of external tools and compilers, e.g. no MSBuild involved. We are using the ParallelTemplate.xaml template that Jim Lamb blogged about previously, which distributes each configuration to a different agent. We developed custom activities for running these external compilers and collecting the information and errors by reading standard out/error and pushing it ......

Posted On Friday, March 30, 2012 9:41 PM

Extending Team Explorer 2012 – Associating Recent Work Items
Extension available at: http://visualstudiogallery.... I have been playing around a bit lately with extending Team Explorer 2012, mostly because it is fun but also to fix a little nagging feature that should have been there from the beginning. Often I (and a lot of other people) find myself wanting to associate several consecutive changesets to the same work item. The problem is that Team Explorer does not remember this, instead I have to either ......

Posted On Thursday, May 16, 2013 6:29 PM

TFS Build: Running Static Code Analysis for Specific Configuration
Running Static Code Analysis (SCA) is something that you should be doing regularly to verify your code base against a large set of rules that will check your code for potential problems and how it comply with standard patterns such as naming conventions for example. Microsoft include several different rule sets that you can use for starters, but you can build your own rule sets as well, that contain the rule that you want to use, In addition, you can write your own custom rules and add these to your ......

Posted On Sunday, January 20, 2013 9:54 PM

Awarded Visual Studio ALM MVP for 2012!
Today I received an email from Microsoft stating that: Dear Jakob Ehn, Congratulations! We are pleased to present you with the 2012 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in Visual Studio ALM technical communities during the past year. This is incredibles news and I really want to thank both the people at Microsoft who nominated me and ......

Posted On Sunday, April 1, 2012 10:42 PM

Book “Team Foundation Server 2012 Starter” published!
During the summer and fall this year, me and my colleague Terje Sandstrøm has worked together on a book project that has now finally hit the stores! The title of the book is Team Foundation Server 2012 Starter and is published by Packt Publishing. You can find it at http://www.packtpub.com/tea... or from Amazon http://www.amazon.com/dp/18... The book is part of a concept that Packt have with starter-books, intended for people new to Team Foundation Server 2012 ......

Posted On Thursday, November 29, 2012 9:33 AM

Get Started using Build-Deploy-Test Workflow with TFS 2012
TFS 2012 introduces a new type of Lab environment called Standard Environment. This allows you to setup a full Build Deploy Test (BDT) workflow that will build your application, deploy it to your target machine(s) and then run a set of tests on that server to verify the deployment. In TFS 2010, you had to use System Center Virtual Machine Manager and involve half of your IT department to get going. Now all you need is a server (virtual or physical) where you want to deploy and test your application. ......

Posted On Wednesday, September 5, 2012 9:39 PM

December 2011 TFS Power Tools Release
Brian Harry just posted an update on the latest version of the TFS 2010 Power Tools. This will most likely by the last version of the Power Tools for the TFS 2010 version, next version will target Dev11! The main improvements in this release are: Team Foundation Server Power Tools for Eclipse MSSCCI Provider for 64-bit IDE’s VS 2010 Power Tools update Improved Work item Search Best Practice Analyzer now also analyzes the integration with Project Server, if you are using it Check out the early Christmas ......

Posted On Friday, December 16, 2011 5:07 PM

New functionality in TFS Build Manager – Managing Triggers and Build Resources
Yesterday we pushed out a new release (August 2012) of the Community TFS Build Extension, including a new version of the Community TFS Build Manager (1.0.4.6) The two big new features in the Build Manager in this release are: Set Triggers It is now possible to select one or more build definitions and update the triggers for them in one simple operation: You’ll note that we have started collapsing the context menu a bit, the list of commands are getting long! When selecting the Trigger command, you’ll ......

Posted On Friday, August 24, 2012 2:28 PM

New VS2012 Book: Pro Application Lifecycle Management with Visual Studio 2012
During the spring/summer I have been involved with reviewing a new book about Visual Studio 2012 ALM from Apress called “Pro Application Lifecycle Management with Visual Studio 2012” The book is written by a fellow Visual Studio ALM MVP Mathias Olausson and his colleague Joachim Rossberg. It is a very comprehensive book that covers both all aspects of ALM in general and also how to implement these practices with Visual Studio 2012. The book also has several chapters dedicated to measuring your improvements ......

Posted On Thursday, August 23, 2012 9:57 PM

ALM Rangers Readiness GIG has shipped!
Together with todays announcement that Visual Studio 2012 as been officially released, the ALM Rangers have also simultaneously shipped (“sim-shipped”) a massive set of solutions for feature gaps and value-add guidance for the ALM community. http://blogs.msdn.com/b/vis... You can find a complete list of ALM Ranger solutions here: http://msdn.microsoft.com/e... I have been a part of the Team ......

Posted On Thursday, August 16, 2012 9:38 AM

TFS Build: Dependency Replication using Community TFS Build Extensions
I have posted before on how to implement dependency replication using TFS Build, once for TFS 2008 using MSBuild and then for TFS 2010 using Windows Workflow. The last post was not complete (I could not post all implementation details back then for various reasons), so I decided that I should post a new solution for this, but this time using the Community TFS Build Extensions library. If it is a good idea to store your dependencies in source control or not is a question that is well debated. I’m ......

Posted On Sunday, July 15, 2012 11:51 PM

Community TFS Build Manager available for Visual Studio 2012 RC
I finally got around to push out a version of the Community TFS Build Manager that is compatible with Visual Studio 2012 RC. Unfortunately I had to do this as a separate extension, it references different versions of the TFS assemblies and also some properties and methods that the 2010 version uses are now obsolete in the TFS 2012 API. To download it, just open the Extension Manager, select Online and search for TFS Build: You can also download it from this link: http://visualstudiogallery.... ......

Posted On Monday, July 2, 2012 10:44 PM

Deploying SSDT Projects with TFS Build
As many of you probably have noticed by now, Visual Studio Database Projects are not supported in the next version of Visual Studio (currently named Visual Studio 11 Beta). When you open a solution containing a VSDB project, VS11 wants to convert it to a SQL Server Developer Tools project instead. This project type ships with SQL Server and has a feature set that covers most of the functionality of the VSDB project, plus some new features, such a support for SQL 2012 and SQL Azure. A feature comparison ......

Posted On Wednesday, April 25, 2012 9:29 PM

Managing Build Templates with Community TFS Build Manager
A year ago I blogged about how to manage your build process templates using the TFS API. The main reason for doing this is that you can (and should!) store your “golden” build process templates in a common location in your TFS project collection, and then add them to each team project that requires those templates. This way, you can fix a bug or add a new feature in one place and have the change affect all build definitions. However, by having the build process templates in a single location, the ......

Posted On Tuesday, February 21, 2012 2:02 PM

Introducing: Community TFS Build Manager
The latest release of the Community TFS Build Extensions include a brand new tool called Community TFS Build Manager and has been created for two reasons: An implementation of the Team Foundation Build API which is referenced by the Rangers Build Customization Guidance V2 (available H1 2012) Provide a solution to a real problem. The Community TFS Build Manager is intended to ease the management of builds in medium to large Team Foundation Server environments, though it does provide a few features ......

Posted On Friday, December 30, 2011 12:36 PM

Writing a Code Coverage Checkin Policy
The source code for this policy is available here : http://www.codeplex.com/TFS... Checkin policies is a great tool in TFS for keeping your code base clean and adhering to your companhy standards and policies. The checkin policies that are included are very useful, but don’t stop there! Implementing your own custom checkin policy is pretty straight-forward and can soon pay off by stopping people from doing silly things (on purpose or not…). At our company (Osiris Data) we have developed ......

Posted On Monday, February 23, 2009 1:58 PM

Handling Warnings and Errors with InvokeProcess in TFS 2010 Build
The InvokeProcess activity is very useful when it comes to running shell commands and external command line tools during a build process. When it comes to integrating with TFS source control during a build, the TF.exe command line tool can be your friend, as it lets you do most of the usual stuff such as check-in, checkout, add, modify workspaces etc. However, it can be a bit tricky to handle the output from tf.exe, since it often produces warnings that is not necessarily a problem for your build. ......

Posted On Wednesday, February 1, 2012 8:55 PM

TFS 2010 Deep Dive classes in Stockholm
I’ll be running a Team Foundation Server 2010 Deep Dive class twice this spring in Stockholm at our friends at Cornerstone. The class is 4 days and we will be “diving deep” into all aspects of TFS 2010, including: Deployment Administration Source Control Check-in Policies Branching strategies Work Items Office integration Reporting Customization Team Build Working with build definitions Developing Custom Activities Automatic deployment Test Management Microsoft Test Manager Creating and running manual ......

Posted On Sunday, January 22, 2012 1:44 PM

Avoiding TF237124 when Creating Work Items in New Areas
At my company we write a lot of tools and extensions that uses the TFS API to automate various things for us. A very common thing to automate is the creation of work items and the areas and iterations structure. Creating a work item using the TFS API is simple, just connect to TFS, get the WorkItemStore service object and create a new work item and set any fields that you want to: Creating a work item //Connect to TFS and get the WorkItemStore object var tfs = new TfsTeamProjectCollection(new Uri("http://localhost:8080/... ......

Posted On Friday, January 20, 2012 9:42 AM

Compatibility Problem with Microsoft Test Manager 2010 and Visual Studio 2011
UPDATE 10.01.2012: The issue has been resolved by Microsoft and will be addressed in patch soon. Here is the full description from the Connect site: “We've identified the rootcause. This bug was introduced in the compatibility GDR patch released for VS 2010 to work against 2011 TFS Server. We shall be releasing a patch soon. Till then, please follow the workaround mentioned to unblock yourselves. “ When setting up a physical environment for a new test controller on our TFS 2010 server, I ran into ......

Posted On Friday, December 9, 2011 11:38 AM

TFS 2010 Build - Troubleshooting the TF215097 error
Anyone working with developing custom activities in TFS 2010 Build has run into the following dreadful error message when running the build: TF215097: An error occurred while initializing a build for build definition \TeamProject\MyBuildDefinit... Cannot create unknown type '{clr-namespace:[namespace]... What the error means is that when the TFS build service loads the build process template XAML for the build definition, it can’t create an instance of the customer workflow ......

Posted On Thursday, December 8, 2011 8:51 PM

First stable release of the Community TFS 2010 Build Extensions
Today the first stable release of the Community TFS 2010 Build Extensions shipped on the CodePlex site. Visual Studio ALM MVP Mike Fourie (aka Mr MSBuild Extension Pack) has been the leader of this project and has done a tremendous job, both in contributing functionality as well as coordinating the work for the first release. Great work Mike! I (as well as several others) have contributed a small part of the activities, I plan to be working on the upcoming releases as well. The build extensions contain ......

Posted On Monday, July 4, 2011 10:50 PM

Automatically Merging Work Items in TFS 2013
** Source available at http://mergeworkitems.codep... ** Half a year ago I wrote about about Merging Work Items with a custom check-in policy. The policy evaluated the pending changes and for all pending merges, it traversed the merge history to find the associated work items and let the user add them to the current changeset. I promised to post the source to the check-in policy (and I’ve got a lot of requests for it), but I never did. This was primary for two reasons: The technical solution ......

Posted On Tuesday, May 17, 2011 8:43 PM

TFS 2010 Inmeta Build Explorer
This weekend we at Inmeta release a free Visual Studio 2010 Team Explorer extensions that solves the problem with the Builds node in the Team Explorer not being hierarchic. For some reason, this part of the Team Explorer didn’t get the nice hierarchical folder structure that the Work items node got in 2010. The result is that, for a company that has several hundreds of builds in the same team project, it becomes very hard to navigate. The solution that we implemented is very simple and uses a naming ......

Posted On Monday, April 4, 2011 9:38 AM

Integrating Code Metrics in TFS 2010 Build
The build process template and custom activity described in this post is available here: http://cid-ee034c9f620cd58d... Running code metrics has been available since VS 2008, but only from inside the IDE. Yesterday Microsoft finally released Visual Studio Code Metrics Power Tool 10.0, a command line tool that lets you run code metrics on your applications. This means that it is now possible to perform code metrics analysis on the ......

Posted On Sunday, January 30, 2011 8:39 PM

TFS 2010 Build Custom Activity for Merging Assemblies
*** The sample build process template discussed in this post is available for download from here: http://cid-ee034c9f620cd58d... *** In my previous post I talked about library builds that we use to build and replicate dependencies between applications in TFS. This is typically used for common libraries and tools that several other application need to reference. When the libraries grow in size over time, so does the number of assemblies. So all solutions ......

Posted On Wednesday, December 15, 2010 1:59 AM

Dependency Replication with TFS 2010 Build
Some time ago, I wrote a post about how to implement dependency replication using TFS 2008 Build. We use this for Library builds, where we set up a build definition for a common library, and have the build check the resulting assemblies back into source control. The folder is then branched to the applications that need to reference the common library. See the above post for more details. Of course, we have reimplemented this feature in TFS 2010 Build, which results in a much nicer experience for ......

Posted On Wednesday, December 8, 2010 8:02 AM

TFS 2010 DeepDive i Stockholm i oktober
Note: Swedish post Efter att ha kört många seminarier, workshops och deep dive kurser på Visual Studio och TFS 2010 i Norge är det nu äntligen dags för oss att köra kurs i Sverige! Första tillfället blir nu i oktober på Cornerstone 18-21 Oktober. Saxat från kursbeskrivningen: T359 - Effektiv systemutveckling med Visual Studio och Team Foundation Server 2010 I denna utbildning lär vi dig hur du och din organisation kan effektivisera systemutvecklingsprocessen med hjälp av Visual Studio och Team Foundation ......

Posted On Friday, September 3, 2010 2:08 AM

Performing Checkins in TFS 2010 Build
Update 15.03.2014 - Fixed broken link to download*** The custom activity is availabe for download here: https://onedrive.live.com/r... *** Often when creating different types of release builds (e.g. where you build something that should be installed or consumed by other applications) there is a need to check in the results of the build back to source control. A common build type for us at Inmeta is Library Builds, which we use for common libraries that are shared among ......

Posted On Wednesday, November 3, 2010 10:20 AM

Developing and debugging Server Side Event Handlers in TFS 2010
Update 2012-01-23: Added note about .NET framework Martin Hinshelwood wrote an excellent post recently http://nakedalm.com/team-fo... ) about a new type of integration available in TFS 2010, namely server side event handlers, that is executed within the TFS context. I wasn’t aware of this new feature and as Martin notes, there doesn’t seem to be any material/documentation of it at all. Previously, when you wanted some custom action to be executed ......

Posted On Wednesday, October 27, 2010 10:48 PM

Merging Work Items in TFS 2010
In TFS 2010, branching and merging have been greatly improved with support for branch visualization and tracking of changesets and work items across branches. A simple example of this looks like this: Here we track Work Item nr 3 which was originally resovled in the Test branch (with changeset 35). We can also see that the work item has been merged into the Production branch (as changeset 37), back to Main (62) and finally to FeatureC (140). If we switch to the Timeline view, we get a nice view of ......

Posted On Wednesday, October 27, 2010 8:10 AM

Why can’t I see test results in the TFS 2010 Build Report?
In TFS 2010, I have been asked this question several times: I have a build setup with tests and (possibly) code coverage, but in the build summary report it only shows No Test Results and No Code Coverage Results What’s more interesting is that when I log in and view the build, I can see the test results! This does of course imply that it is a one of those annoying security issues, and of course it is. To be able to see test results you must have the View Test Runs permission, which can be assigned/revoked ......

Posted On Wednesday, October 6, 2010 8:11 AM

TFS Team Build 2010: How to place the build output to a fixed location
By default, TFS Team Build creates a new folder in the drop location for every build. I have seen request from people that wonder how to always have team build put the output in the same folder every time, effectively overwriting the results from the last build. This is easy to accomplish by adding an activity that copies the drop folder to a fixed location. To copy the result of the build to a fixed location, you need to modify the build process template: Open the build process template XAML file ......

Posted On Wednesday, September 1, 2010 8:47 AM

TFS 2010 Build: Dealing with the API restriction error
Recently I’ve come across this error a couple of times when running builds that exeucte unit tests using Test containers: API restriction: The assembly 'file:///C:\Builds\<path... has already loaded from a different location. It cannot be loaded from a new location within the same appdomain. Every time I’ve got this error, the project has been a web application, and the path to the assembly points down to the _PublishedWebsites directory that is created beneath the Binaries folder ......

Posted On Tuesday, June 8, 2010 6:08 AM

Building Visual Studio Setup Projects with TFS 2010 Team Build
UPDATE: 2010-09-15 – Added details about the use of the ExitCode variable One of the most common complaints from people starting to use Team Build is that is doesn’t support building Microsoft’s own Setup and Deployment project (*.vdproj). When creating a default build definition that compiles a solution containing a setup project, you’ll get the following warning: The project file "MyProject.vdproj" is not supported by MSBuild and cannot be built. This is what the problem is all about. MSBuild, ......

Posted On Friday, May 14, 2010 8:38 AM

Speed up loading of test results from builds in Visual Studio
I still see people complaining about the long time it takes to load test results from a TFS build in Visual Studio. And they make a valid point, it does take a very long time to load the test results, even for a small number of tests. The reason for this is that the test results is not just the result of the test run but also all the binaries that were part of the test run. This often also means that the debug symbols (*.pdb) will be downloaded to your local machine. This reason for this behaviour ......

Posted On Sunday, May 9, 2010 11:04 PM

Executing legacy MSBuild scripts in TFS 2010 Build
When upgrading from TFS 2008 to TFS 2010, all builds are “upgraded” in the sense that a build definition with the same name is created, and it uses the UpgradeTemplate build process template to execute the build. This template basically just runs MSBuild on the existing TFSBuild.proj file. The build definition contains a property called ConfigurationFolderPath that points to the TFSBuild.proj file. So, existing builds will run just fine after upgrade. But what if you want to use the new workflow ......

Posted On Wednesday, May 5, 2010 12:04 AM

Reember to uninstall all Beta 2 stuff before upgrading to VS 2010 RC
Yesterday I upgraded my dev laptop to VS 2010 RC. To upgrade to VS 2010 RC you need to first uninstall VS 2010 Beta 2 (which doesn’t really make it an upgrade does it? :-) I also hade an instance of TFS 2010 Beta 2 om my machine so I uninstalled that as well. The installation of VS 2010 went fine, and then I installed Team Explorer 2010 RC. However, when starting VS and switching to the team explorer, I got the following error: Could not load type 'Microsoft.TeamFoundation.C... ......

Posted On Tuesday, February 9, 2010 8:52 PM

TFS 2010 Beta 2 – Upgrading Builds from TFS 2008
We are in the process of upgrading the entire company to TFS 2010 Beta 2, and in preparing for that we have done some test upgrades to make sure that all things work as expected after the upgrade. As expected, most issues that turned up had to do with builds. This is one of the areas that has changed the most compared to TFS 2008. I thought that I would use this post to run through some of the issues that we found. First of all, when upgrading a TFS 2008 to TFS 2010 Beta 2, all build definitions ......

Posted On Tuesday, November 24, 2009 8:23 PM

TFS Team Build 2010: Working with Custom Code Activities
Disclaimer: This blog post discusses features in the TFS 2010 Beta 1 release. Some of these features might be changed in the RTM release. In TFS 2010, Microsoft has changed the build orchestration language in Team Build from MSBuild to Windows Workflow 4.0. Aaron Hallberg has written a post on how to implement a custom workflow activity using either the workflow designer or using a code activity that composes an activity. In this post, I will show how to implement a “pure” code activity, i.e. no ......

Posted On Thursday, August 13, 2009 9:38 AM

Modify Build Failure Work Item in TFS 2010 Build
The default behaviour in TFS Team Build (all versions) is to create a bug work item when a build fails. This main benefit of this is that you get a work item for something that needs to be done, namely to fix the build!. When the developer responsible for the build failure has fixed the problem, he/she can associated that check-in with the work item that was created from the previous build failure. In TFS 2005/2008 you could modify the information in the created work item by changing some predefined ......

Posted On Wednesday, April 28, 2010 8:15 AM

Creating a Build Definition using the TFS 2010 API
*** UPDATE 2010-08-17 ** Several people have asked me for a complete sample application, so I have put this together and it is available here: http://cid-ee034c9f620cd58d... **** In this post I will show how to create a new build definition in TFS 2010 using the TFS API. When creating a build definition manually, using Team Explorer, the necessary steps are lined out in the New Build Definition Wizard: So, lets see how the code looks ......

Posted On Monday, April 26, 2010 8:09 PM

Getting TF215097 error after modifying a build process template in TFS Team Build 2010
When embracing Team Build 2010, you typically want to define several different build process templates for different scenarios. Common examples here are CI builds, QA builds and release builds. For example, in a contiuous build you often have no interest in publishing to the symbol store, you might or might not want to associate changesets and work items etc. The build server is often heavily occupied as it is, so you don’t want to have it doing more that necessary. Try to define a set of build process ......

Posted On Wednesday, April 21, 2010 11:52 PM

Implementing Release Notes in TFS Team Build 2010
In TFS Team Build (all versions), each build is associated with changesets and work items. To determine which changesets that should be associated with the current build, Team Build finds the label of the “Last Good Build” an then aggregates all changesets up unitl the label for the current build. Basically this means that if your build is failing, every changeset that is checked in will be accumulated in this list until the build is successful. All well, but there uis a dimension missing here, regarding ......

Posted On Thursday, April 15, 2010 11:50 PM

VSTS 2010: Enabling Test Impact Analysis
A really cool new feature in VSTS 2010 is Test Impact Analysis which let developers view what tests that are affected by the current code changes. Pieter Gheysens wrote a blog post on how to set this up in the CTP, but things have changed a bit in Beta 1 so I thought that I would show how it is done. Since it still is a bit unintuitive to enable it, it might change once again in the RTM. The reason that it is a bit unintuitive to set it up, is because you need to have the following things: You must ......

Posted On Thursday, June 4, 2009 6:08 PM

TFS Team Build 2010: Executing Unit Tests
There are some changes and improvements in the area of executing unit tests in Team Build 2010. Mostly the changes make it easier to define which unit tests you want to execute as part of the build. In this post I will go through the different options that you have when it comes to running unit tests and enabling code coverage. To configure test settings for a Team Build, you select Edit Build Definition in Team Explorer, and then go to the Build Process tab. In the Build process parameters box there ......

Posted On Wednesday, June 3, 2009 10:27 PM

Working with Build Definitions in TFS Team Build 2010
Disclaimer: This blog post discusses features in the TFS 2010 Beta 1 release. Some of these features might be changed in the RTM release. In my last post I talked about the new major features of Team Build in TFS 2010. This time, I will go into more detail on how you work with build definitions. In TFS 2010, the whole build process is now implemented on top of Windows Workflow Foundation 4.0 (WF4). This means that everything that has to do with creating and customizing builds in TFS 2010 is now done ......

Posted On Wednesday, May 27, 2009 10:17 PM

Copyright © Jakob Ehn | Powered by: GeeksWithBlogs.net | Join free