Upgrading from TFS 2008 Trial to TFS 2008 Full

| 14 Comments

One of the most frequent questions I get when talking to people about TFS if how to upgrade from the freely downloadable 90-day TFS 2008 trial to a full version of TFS.  Our TFS 2008 license key arrived at the weekend, so I thought I would take the opportunity to record the process.  The first two steps have nothing to do with installing your license key, just purchasing it - but sadly are often the most complicated.  Installing the actual key once received, is pretty trivial as I hope you will see.

Step 1:  Purchase a TFS License Key.

This step is frequently mis-understood.  You have to pay for the full version of TFS.  Just because you are a partner of an MSDN subscriber, doesn't mean that you get TFS included.  As an MSDN Subscriber, depending on your subscription type you do get access to a 5-user limited version of TFS called "Team Foundation Server Workrgoup Edition".  However only Gold Partners or Partners with an ISV Competency get TFS included in their partner fees - everyone else has to purchase it.  When connecting to TFS, you also need to make sure you have enough Team Foundation Server Client Access Licenses (CAL's) to cover your use - if you have a Team Suite flavor of MSDN then that gives you one CAL.

Step 2: Obtain TFS License Key.

The license key for TFS will be printed on a little sticker on the back of the media that it arrives on.  If it didn't (perhaps because you purchased TFS via a volume licensing agreement) then there are ways around this to get the license key out of the media (look for a file called setup.sdb and open it in Notepad, look for [Product Key], usually at the bottom of the file, and you will find it there).

Because getting a TFS License Key usually involves the physical delivery of the media, you should make sure that you factor this time into your purchasing decision.  If (like most people) your purchasing process takes longer than you budgeted for - then you do have the ability to extend your TFS Trial by an additional 30-days.

Step 3: Enter TFS Maintanence Mode

Go to, Control Panel, Add Remove Programs.

 Add / Remove Programs

Then find Microsoft Visual Studio 2008 Team Foundation Server in the list and press Change/Remove

Team Foundation Server Maintanence Mode

Step 4: Enter the Full Key for TFS

At the bottom of the maintenance dialog, you have the option to enter your full license key. 

TFS2008 Maintence Dialog

Note that there was a bug in the RTM version of TFS 2008 that means that workgroup edition doesn't have the ability - see this post for details.  This is TFS 2008 90-day trial, so it works just fine for us.

Enter your license key and press Next.  Note that this will install the license key and fire up a command window for a few seconds while it restarts IIS for the TFS server.  Once you are finished, you will get the following dialog.

License upgrade complete

And you are complete.  If you really want to check that the new license key has taken hold, then you can fire up a copy of Brian Harry's VersionDetection tool to set your mind at rest.

Version Detection tool showing that my TFS has a proper license key installed.

And there you go - running the final release (9.0.21022.8) with no expiry date :-)

14 Comments

Hi Richard,

This is excellent and exactly what i've been looking for as we used to do this process with NAnt and now are migrating to TF Build.

A couple of questions:

You don't checkout or checkin the buildnumber.txt file. So where does this live? In the $(DropLocation), but where is this?

My buildnumber.txt sits alongside my TFSBuild.proj file and i have to check it out in the BuildNumberOverrideTarget, however this is causing me problems as this is called before the 'BeforeGet' or any of the get targets so the file is not actually there!

Cheers,
Andy

The Drop location is the network folder than all the builds get copied to when they have finished being built ready for staging. Therefore the buildnumber.txt is actually not under version control.

However I am not completely happy with this scenario.

If you store your buildnumber.txt file alongside the TFSBuild.proj file then Team Build will actually get that file for you as part of the bootstrap process. It actually downloads everything in folder that the TFSBuild.proj file lives (but doesn't download things in sub-folder by default). Therefore you will have it in BeforeGet.

You will at some point obviously want to check this file in at some point (probably in BeforeGet or AfterGet). When you do this check-in (by doing an exec of the TFS command line "tf /checkin", but sure to check-in with a comment of "***NO_CI***" to ensure that the check-in didn't trigger another CI build which would put you in a recursive build loop.

Hope that helps,

Martin.

Hi,

I completely agree on using an incremented number at the end of the version number! But how should it be called to avoid confusion with TFS's whole "build number"? I'll go with "revision suffix" for the rest of this comment...

So, with the same idea in mind, our approach to this was slightly different. In BuildNumberOverrideTarget, we call a custom task just like you do, except that it doesn't read the revision suffix from a file and write it back. Instead it queries the BuildStore, gets the biggest existing suffix for that build definition, and adds 1.

A loop on the existing build data can give us this information quite easily:

------------------------------------------
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Build.Proxy;
...
TeamFoundationServer server = TeamFoundationServerFactory.GetServer(this.TfsUrl);
BuildStore store = (BuildStore)server.GetService(typeof(BuildStore));
BuildData[] buildList = store.GetListOfBuilds(this.TfsProject, this.TfsBuildType);
foreach (BuildData data in buildList)
{
   // just find the biggest revision suffix in use
   // by looking at the end of each data.BuildNumber
}
------------------------------------------

That's it we have the new revision suffix, and we can use it when overriding the build number.

What do you think about this approach?
We haven't been using it for long but it seems to work fine for the moment.

Cheers

Romain


Hi Martin, I have tried the procedure shown below, but the problem is that I don't have the upgrade option.
Only REPAIR OR REINSTALL AND UNINSTALL options.

Thank's for helping

Eric Stedman

Hi I successfully implemented the concept of incrementing revision number but I am not able to checkin the Files.

I am using following commands

Command=""C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe" checkin /comment:"$(NoCICheckInComment) " /noprompt /override:"Testing" /notes:"Code Reviewer"="abbagchi" /recursive "C:\BLD1\Sources\TestProject\TestProject\Properties\assemblyinfo.cs""/>


but the TF.exe command failed and exites with 100 code

Please help me

Personally I do not like the build process to check in files that it modifies. However - to figure out what is going wrong in your case I would take a look at the BuildLog.txt from the build as that will contain the error message from tf.exe

Good luck,

Martin.

sorry I didn't stick in the actual error message it is, the error I get is
error MSB4067: The element beneath element is unrecognized.

I could be to do with the version of TeamBuild i.e. I'm using 2005.

sorry I'll try this again, the TeamBuild will not pick up the BuildNumber property.

here's the error
error MSB4067: The element @BuildNumber@ beneath element @PropertyGroup@ is unrecognized.

I'm using TeamBuild 2005.

I'm implementing this on TFS 2008 but I'm getting error MSB4036: The "Attrib" task was not found. Thanks in advance for your help. Below is the tail end of the BuildLog.txt:

------------------------------------------
Done building target "CoreGet" in project "TFSBuild.proj".
Target "AfterGet" in file "C:\Documents and Settings\svc-alv-tfs-svc\Local Settings\Temp\POC_TeamBuild_WDP\POC\BuildType\TFSBuild.proj" from project "C:\Documents and Settings\svc-alv-tfs-svc\Local Settings\Temp\POC_TeamBuild_WDP\POC\BuildType\TFSBuild.proj":
Task "Message"
  Modifying AssemblyInfo files under "C:\Documents and Settings\svc-alv-tfs-svc\Local Settings\Temp\POC_TeamBuild_WDP\POC\Sources".
Done executing task "Message".
C:\Documents and Settings\svc-alv-tfs-svc\Local Settings\Temp\POC_TeamBuild_WDP\POC\BuildType\TFSBuild.proj(252,5): error MSB4036: The "Attrib" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with  in the project file, or in the *.tasks files located in the "C:\WINDOWS\Microsoft.NET\Framework\v3.5" directory.
Done building target "AfterGet" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\Documents and Settings\svc-alv-tfs-svc\Local Settings\Temp\POC_TeamBuild_WDP\POC\BuildType\TFSBuild.proj" (EndToEndIteration target(s)) -- FAILED.

Build FAILED.

"C:\Documents and Settings\svc-alv-tfs-svc\Local Settings\Temp\POC_TeamBuild_WDP\POC\BuildType\TFSBuild.proj" (EndToEndIteration target) (1) ->
(AfterGet target) ->
C:\Documents and Settings\svc-alv-tfs-svc\Local Settings\Temp\POC_TeamBuild_WDP\POC\BuildType\TFSBuild.proj(252,5): error MSB4036: The "Attrib" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\WINDOWS\Microsoft.NET\Framework\v3.5" directory.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:01.96
------------------------------------------


The text from the log I posted was cut off. Here's another try...

error MSB4036: The "Attrib" task was not found.
Check the following:
1.) The name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface.
3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\WINDOWS\Microsoft.NET\Framework\v3.5" directory.

Figured it out...

I missed the part about installing MSBuild Community Tasks. All is well after I installed it and added this to TFSBuild.proj:

Attrib is part of the MSBuild Community Tasks project...

Oops, hadn't refreshed yet today when I replied there... missed your post right before mine.

Done executing task "Get".
Task "SetBuildProperties" skipped, due to false condition; ( '$(GetVersion)' != '$(SourceGetVersion)' ) was evaluated as ( 'C87748' != 'C87748' ).
Done building target "CoreGet" in project "TFSBuild.proj".
Target "AfterGet" in file "C:\MyAccount_Build\BuildType\TFSBuild.proj" from project "C:\MyAccount_Build\BuildType\TFSBuild.proj":
Task "Message"
Modifying AssemblyInfo files under 'C:\MyAccount_Build\Sources' and 'C:\MyAccount_Build\BuildType'.
Done executing task "Message".
Using "Attrib" task from assembly "C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.dll".
Task "Attrib"
Done executing task "Attrib".
Using "FileUpdate" task from assembly "C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.dll".
Task "FileUpdate"
C:\MyAccount_Build\BuildType\TFSBuild.proj : error : Object reference not set to an instance of an object.
Done executing task "FileUpdate" -- FAILED.
Done building target "AfterGet" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\MyAccount_Build\BuildType\TFSBuild.proj" (EndToEndIteration target(s)) -- FAILED.

Build FAILED.
Can someone let me know where I went wrong.

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.