Building and Unit Testing .Net 4.0 with Team Build 2008, the correct order

I’ve been helping my customer setting up .Net 4.0 build servers lately as you may have read in my previous post. In the previous post, I listed my challenges getting .Net 4 assemblies to build and unit test with Team Build 2008 so I thought It would be time to share the correct order to get the stuff working!

  1. Install Visual Studio 2010 Premium
  2. Install Visual Studio Team System 2008 Development Edition
  3. Install Visual Studio Team System 2008 Service Pack 1
  4. Install Team Build 2008
  5. Install Team Build Service Pack 1
  6. Configured Team Build 2008 to use MSBuild 4.0 instead of MSBuild 3.5. To do this edit %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\TFSBuildService.exe.config and set the MSBuildPath property to C:\Windows\Microsoft.NET\Framework\v4.0.21006\

That should do it! And if you install your build server in that order you won’t get the following error:

  • MSBUILD : warning : Visual Studio Team System for Software Testers or Visual Studio Team System for Software Developers is required to run tests as part of a Team Build
  • And you won’t replace the Microsoft.TeamFoundation.Build.targets with an incorrect workspace pattern:
    TFS Build 2008:
    $(COMPUTERNAME)_$(BuildDefinitionId)
    After VS 2010 installation:
    $(COMPUTERNAME)_$(BuildDefinitionId)_$(BuildAgentId)

Hope this summarizes how to install a build server that builds and unit tests .Net 4.0 applications with Team Build 2008.

Cheers!

Hugo

BDD Bonanza with SpecFlow, SpecLog and TFS, huh?

Confession

I must admit that title is somewhat provoking and that will certainly get some people really going. Anyway from a TFS perspective I see real potential in the integration between SpecLog and TFS and I hope to show this in upcoming posts.

Background

I’ve been using SpecFlow a couple of months and I really like the feeling I get every time a debug my specifications Ler. A colleague of mine Marcus Hammarberg has written lot’s of posts like this and at some point we even did a joint venture that resulting in this post by Marcus and this one by me.

So we had quite a good story for developers at that point and really no nice way to present specification files to testers or business analysts. Well the same team that brought you SpecFlow has also made SpecLog a tool that looks very promising.

Installation

The installation is not completely automated there’re a some manual steps you need to do to make the TFS Integration work. This is certainly a feature I’d really like TechTalk to provide in future releases.

If you are using the MSF Agile process template make sure you’ve downloaded version TechTalk.SpecLog.1.0.63.msi or later. When I couldn’t get the integration to work the guys at support helped me out and after that weekend they released a working version, very impressive indeed!

Installing the MSI

Make sure you’ve logged in on your TFS server. Run the downloaded msi and make sure you select all components like this picture:
image

Create service account

Create a service account like the picture below:image

Give the same service account Log on as a Service rights as the picture shows.

image

After this you have to start a command prompt as Adminstrator and do the following:

  • Add the created account to the [TEAMFOUNDATION]\Team Foundation Service Accounts with the following command
    tfssecurity /g+ “Team Foundation Service Accounts” n:[YOURDOMAIN]\SpecLogSvc ALLOW /server:http://yourtfsserver:8080/tfs
  • Making it possible for the service account to open TCP port 4242 with the following command
    netsh http add urlacl url=http://+:4242/ user=[YOURDOMAIN]\SpecLogSvc

Create a shared folder

Create a shared folder that gives [YOURDOMAIN]\SpecLogSvc contribute rights to that folder like so:

image

Follow the instructions given from TechTalk

In your SpecLog folder you will have two folders, one called Server and one called TFSIntegration. In these folders there’re txt-files that will guide you through the next manual steps you need to get started. Start with server instructions first.

Gotchas

  • The default log path is under %LOCALAPPDATA%\SpecLog so I changed it to the same shared folder created earlier.
  • When you create the windows services you’ll be prompted with username and password. It’s very important to enter the username in the format [YOURDOMAIN]\[ServiceAccount]. Otherwise you’ll get an error.

image

Testing

You have to connect to a shared repository to get the TFS integration working like the picture shows below:

image

Next steps are to start working on your requirements Skrattar! Well I’ve made a simple screen capture that shows how it could look.

image

And If we take a look at the US3 user story we will find this nice overlook. Notice how you can see the TFS source controlled Gherkin file connected to this User Story.

image

The same User Story would look like this in Visual Studio:

image

image

And as you can see the integration works…the service account does all the job:

image

I must say that things are truly starting to come full circle with SpecLog and I hope that my small post will get you started with SpecLog integration with TFS.

I’ll sure keep working with SpecLog, TFS and most importantly people,

Hugo

TFS 2010 better with SharePoint

Lately I’ve got some questions concerning TFS 2010 with or without SharePoint and this blog post does a fair attempt to answers some of those questions. If you don’t have any hesitations and like to use SharePoint you should read this post to figure out which version of SharePoint you should use.

Background

SharePoint is no longer a required component when you install TFS 2010 and therefore some customers are asking questions about having SharePoint integrated with TFS 2010 or not.

Dashboards

You wouldn’t buy a car without a dashboard or would you?

If we take a look at the Dashboard for the MSF Agile process template you’ll should see something like so:

image

Speed

You have detailed information of your projects current speed much like the speedometer in your car like so:

image

Work Item overview

You get an overview of the contents of your project like so:

image

You could compare this to your gas gauge in your car or any other information gauges that tell you detailed information about the car.

Builds

Visualize the state of your build for all projectmembers and answers questions like why are builds breaking by drilling down to the individual builds directly from SharePoint.

image

Checkins

You also get an overview of the latest checkins and you drill into the details directly from SharePoint.

image

Work with your Work Items

You can even get down and work with your Work Items directly from SharePoint in various ways:

image

Interested in a specific Work Item? Use this shortcut:

image

Document Management

You get a state of the art document management system with lots and lots of possibilities and customizations that will make the management of your project documents a joy. Read more about it here.

Search

With SharePoint comes a great search engine that will help you search for information throughout your team portal.

And a whole lot more

Blogs, Wikis, announcements, calendars and a whole lot more goodies are there to make your collaboration experience the best.

Summary

TFS is a great product without your team portal in SharePoint but it’s truly the best collaboration platform for development projects in the world with SharePoint and I highly recommend you installing it when you install TFS 2010.

Have a nice one!

Hugo