Etienne's VSTS World

Fascinating tidbits about VSTS and .NET (well I hope...)

  Home  |   Contact  |   Syndication    |   Login
  154 Posts | 0 Stories | 94 Comments | 122 Trackbacks

News



View Étienne Tremblay's profile on LinkedIn

Tag Cloud


Archives

Post Categories

Image Galleries

My Friends

My Links

Friday, October 03, 2008 #

So I’ve been trying to do some custom build numbering for my Team Build project and was confronted with a lot of let’s say “uninformation” and some great information also.  I really didn’t want to create a custom task that I would need to maintain so I set on a long search for the Truth… needless to say I didn’t find it.  But here is the information I found that should get you you to the right place.

There is a great custom task created by the MSBuild team that used to be on GotDotNet but is now MSDN Code Gallery.  It’s called the AssemblyInfo Task there is currently a bug with that custom task that breaks is starting in 2007 and it has to do with the fact the build parts a.b.c.d can’t be bigger than 65k.  You can find a great explaination here and here of the problem and solution. Once I worked that out I proceeded to Team Build.

 

There is a great reference post by Gautam Goenka (MSFT) about how to implement this custom task in Team Build I did exactly with he suggests in Using AssemblyInfo task with Team Build.

Now I was pondering, “Will this work and set the same number for ALL solution I’m building in my TFSBuild.proj file? Now that would be neat”.  I first started with one solution and all worked great.  I then put two solution and bam! exactly what I wanted, same number everywhere for each csproj or vbproj project compiled in all the solutions.

Note: If you have a mix of VB.NET and C# you might need to add stuff in the AfterGet to make sure you check-out all the AssemblyInfo.vb and AssemblyInfo.cs but that shouldn’t be too hard to do.

So all was good… well almost, Team Build creates is own build numbering something like BuildDefinition_yearmonthday.buildrun which is very nice but doesn’t match my shiny new a.b.c.d so what should I do to make them match, off to Internet again to find information about how to override the build name in Team Build.  There is just such an override that we need to use it’s call BuildNumberOverrideTarget problem is I’m stuck in a catch 22 the task occurs before the build number gets created by the AssemblyInfo task so essentially I couldn’t use this.  Off to the Internet again… Lots of people complain and try to solve this by changing the order of the overrides, calling some AssemblyInfo task twice once before to get a number and once after…yuck in the end it was not very nice.  I needed a way to change the build number in Team Build but after the compile worked.  So in the target AfterCompile that is used in Gautam’s post I added two things

  <Target Name="AfterCompile" Condition="'$(IsDesktopBuild)'!='true'">
    <Exec WorkingDirectory="$(SolutionRoot)"
          Command="$(TF) checkin /comment:&quot;Auto-Build: Version Update&quot; /noprompt /override:&quot;Auto-Build: Version Update&quot; /recursive $(AssemblyInfoSpec)"/>
    <RemoveDir Directories ="$(DropLocation)\$(BuildNumber)"/>
    <CreateProperty Value ="$(BuildDefinitionName)_$(MaxAssemblyVersion)">
      <Output TaskParameter ="Value" PropertyName ="BuildNumber"/>
    </CreateProperty>
    <UpdateBuildNumberDropLocation
              TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
              BuildUri="$(BuildUri)"
              BuildNumber="$(BuildNumber)"
              DropLocation="$(DropLocation)\$(BuildNumber)" />
  </Target>

First thing we need to do is remove the original build drop location using the RemoveDir task.

Next, the CreateProperty create a new BuildNumber based on the number that was used in the AssemblyInfo Task so that’s exactly what we need now instead of BuildDefinition_yearmonthday.buildrun we have BuildDefinition_a.b.c.d.

Finally, the kicker I was searching in the Microsoft.TeamFoundation.Build.targets file in C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild directory and in there I found what I needed amongst all sort of very cool information about the tasks that are called by TeamBuild but my nugget was in the InitializeEndToEndIteration Target, which is called after the BuildNumberOverrideTarget. I noticed this nifty task called UpdateBuildNumberDropLocation with this comment on top

    <!-- Update the build number and drop location in the database. This task will also create the drop directory 
         and grant the service account full rights on it.

Ah ah! I said to myself, this is exactly what I need.  An what do you know, I updated my AfterCompile Target like above and the sweetness of victories came to me.  Now the build number in the build report match and all the assembly compiled by my build definition have the same number.  While the build is running at the beginning you will have the wrong number for a while (the old one) but at the end you should be good to go.  The nice thing about that is it’s calling the same task the Team Build is calling so all the reports and links etc all work with the new number.

I hope this helps you guys I know I spend a lot of time trying to figure an elegant way to do this.

ET

 

Update: William Bartholomew one of my new fellow MVP sent me an email with this advice, add $(NoCICheckInComment) to the TF command (the first Exec) so that this particular check-in (of assemblyinfo change) won’t trigger and infinite loop of builds if you have a CI build on your build server.  Also he add another suggestion on how to resolve the problem but it involves creating you own build task to update the number (which I didn’t want to do)

here what he suggests

  1. Call the Version task from MSBuild Community Tasks (http://msbuildtasks.tigris.org) in BuildNumberOverrideTarget to allocate a new version number.
  2. In the AfterGet (or BeforeCompile) extensibility tasks update the AssemblyInfo files using the $(BuildNumber). I actually wrote my own custom task to modify the AssemblyInfo files but if the AssemblyInfo Task allows you to pass in the version number you could use that too.

Finally I notice my other good friend Martin also has a nice blog post of this Aligning Build Numbers with Assembly Versions in TFS2008

 


Thursday, October 02, 2008 #

In case you didn’t know, as part of the slew of information that Microsoft in this week one very cool announcement was made.  VSTDE and VSTDBE are now both available to MSDN subscriber that have one of those versions. 

If you do, make sure you download the one you didn’t have (DBPro if you had Dev and Dev if you had DBPro) and install the other on top of the current VS you have.  They functionality of the other version will just become available in VS.  It’s as simple as that.

Kudos to Microsoft for making this happen I think this is a great decision and will bring great value to the current owner of those respective versions.

http://blogs.msdn.com/gertd/archive/2008/09/29/team-developer-team-data-team-developer.aspx

 

Cheers,

ET


Have a look at Brian Harry’s blog entry on the next generation power tools probably available end of October…

A new team menu with presence, and team based tasks…

A new way to download project related custom add-ins like check-in policy and Custom work item control.  This is something I commented about way back in 2005 as a big hole to fix.  I’m glad they tackled this. This is going to be very sweet in a corporate environment.

Shell integration looks great but I’m not really a fan of that.  I would rather live in VS so a lot of those functions I already have integrated.  But I know a lot of folks that have been waiting for this.  This will compete nicely with the subversion equivalent.

PowerShell support is also cool.  All the command line utilities in PS… sweet!!

 

I’m really exited about this next release and I’m looking forward to using them.

Here are a few pics to wet your appetite… go to Brian’s blog for a lot more.

 

Cheers,

ET

Technorati Tags: ,

Wednesday, October 01, 2008 #

I feel rely privileged again this year to be awarded for my 4th time as a Team System MVP.  This award as great value to me since it recognizes my expertise in a product and my dedication to the community.  I spend a lot of time with developers both inside and outside EDS and I can tell you they are always exited to learn about new things they can do with the product. 

This year is going to be an extremely exiting year with VSTS2010 aka “Rosario” and the .Net Framework 4.0 work going in overdrive.  I’m really looking forward to doing to talks on this and working on the VSTS council this year.

I’m extremely grateful for all the opportunities I’ve been presented with in the last 4 years and I know a lot of them come from the MVP status.  Like Imagine Cup, MVP summit, UG leadership, etc.

Well that’s it for now.

Cheers,

ET

Technorati Tags: ,

Monday, September 29, 2008 #

Go check it out at those links

http://www.microsoft.com/presspass/press/2008/sep08/09-29VS10PR.mspx

http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx

Visual Studio Team System 2010 Week on Channel 9:
http://channel9.msdn.com/posts/VisualStudio/Visual-Studio-Team-System-2010-Week-on-Channel-9/

 

This is a really defining release of Visual Studio.  I’ve been very close to this version for the last 2 years and there are some innovation in there that will really make our lives as developer and architect much better.  I’m really looking forward to doing to talks on this release and talk more about the new things in the coming year.

 

Cheers,

ET

Technorati Tags:

Wednesday, September 10, 2008 #

Read all about it here: http://www.microsoft.com/canada/msdn/techdays/default.aspx

Cheers,

ET

 

Technorati Tags:

Tuesday, August 26, 2008 #

Communauté .NET Montréal

The Groupe d'usagers Visual Studio Montréal has changed name for Communauté .NET Montréal to better reflect it's activities.

What's new?  A 4th meeting each month, this time at lunch hour.  It's called @Lunch and it will be less formal and more of a discussion type of meeting inspired by Open Space and Alt.NET meetings.

Check out the new site here:
http://www.dotnetmontreal.com


Monday, August 18, 2008 #

The great DevTeach conference is coming to Montreal this year again from December 1-5 and i’ll be speaking again.  I have 2 sessions in the new Team System track:

Adopting Team System
You have seen the Team System overviews, you are stoked and want to start using the product but you’re not sure where to start? This session is for you, in it we will open the box and look inside, we will discuss the various installation scenarios (solo developer or for a group, hardware vs. Virtual), the difference between the various Visual Studio SKUs, the adoption rate of all the new features now available in VSTS and how we should adopt them, and finally touch on Customization of Team Foundation Server. We will finish with the best practices of usage.

 

Team System Process Customization
In this session we’ll create a brand new process template and look at the various possibility that we have to customize it. New work item types, new process, new reports. Everything you always wanted to know about customizing a TFS template and more.

 

Has always this should be fun.

Cheers,

ET

Technorati Tags: ,

Monday, August 11, 2008 #

there you have it.  Check this post of all the info. .Net Framework 3.5 SP1 and Visual Studio 2008 SP1 are Available!

Cheers,

ET

Technorati Tags: ,

Hello everyone,

With SQL 2008 shipping late last week it was time to try my hands at this scenario.  It worked great but with a few things to remember.  Here is the lowdown.

There are two way to go about in order to install TFS with SQL 2008 1) Fresh install, 2) Upgrade SQL.

1) Fresh Install

I used Windows 2008 because this is going to be the prevalent OS to install on when people are going to start fresh or it most likely will.  There was a little issue with that install when Windows 2008 RTM’ed back in February and I talked about it in this post.  I wanted to see if the WSS issue was resolved in SP1.  Well the good news is yes.  When installing TFS, the experience is now the same for Windows 2003 and Windows 2008 and to boot, the SP1 now updates the WSS bits on the RTM DVD to WSS 3.0 SP1.  Cool.

The problem is SQL 2008 now.  You can’t use TFS 2008 RTM to install with SQL 2008.  You need to slipstream (or Integrate) the SP on top of the RTM bits.  The new install instruction covers this but here is a step by step.

a) Copy the original Media to a folder on any machine say d:\tfs\RTM

b) Extract the SP to a folder say d:\tfs\SPExtract

C:\SP1Download\TFS90SP1-KB949786-ENU /extract:d:\tfs\SP1Extract

c) Create a directory to put the result of the integration in say d:\tfs\ATIntegrated

d) Integrate (slipstream) the SP to the AT install by using this command line (note if you are in Windows 2008 make sure you start you console window as an Administrator or you’ll get prompted by UAC when executing the command).

msiexec /a C:\TFS\RTM\AT\vs_setup.msi /p C:\TFS\SP1Extract\TFS90sp1-KB949786.msp TARGETDIR=C:\TFS\ATIntegrated

e) Once you have done this make sure you copy back the ATIntegrated content to the original AT in the d:\TFS\RTM\AT overriding the original content. 

Now you might be tempted to do the same integration with the Build and Proxy directory since they both have a vs_setup.msi file I know I was and actually did.  You can’t.  I works (well it looks like it does) but when you run the setup, it fails miserably.  This is documented by Microsoft to NOT do that for Build and Proxy.  You need to install the RTM version and then run the SP on top of it.  It would have been nice to have a new DVD with all component SP’ed but it’s not to be.

f) After you have copied back the content to the original RTM directory, just burn a new ISO or DVD and you’re ready to install it.

NOT QUITE…

If you want to have Team Explorer (TE) on your server to create new project like I do, you need to install it BEFORE you install SQL 2008 and apply the TE SP1 also before IF you want to install the client tools as part of the SQL 2008 install which you most likely will to manage backups and verify tables, etc.  This problem is fully explained in this KB, Visual Studio 2008 SP1 may be required for SQL Server 2008 installations. If you want to create an all in one server with Studio and Build for example you need to follow the same procedure.  Here is an ordered list;

i) Windows (2003/2008) + IIS

ii) VSTS and/or TE 2008

iii) SP1 of VSTS and/or TE (it’s the same one that installs for all version of VS/VS Core, you need to run it once for anything component you have installed)

iv) SQL 2008 + Component like DB, RS, AS, Client Tools, etc (follow the install guide instructions, i'll try to post an unattended install file when I have one)

v) TFS SP1 (integrated), this will now install WSS properly for both Windows 2003 and Windows 2008 so no need to install it before.

vi) TFS Build + TFS SP1 (which is a different SP then the VS one)

vii) TFS Proxy + TFS SP1

viii) Office components (note this can be anytime I just like to install at the end)

You should then be in business… at least I was.  It took about 3h considering I already had a base 2008 VM.  The SP takes a long time to install but it works fine.  Double-click and wait.

Note that this is the way I did it.  I just read a few minutes ago that if you are starting fresh you can install SQL 2008 with everything you need and then install VS on top of it and then apply the SP.  That sounds weird to me since a version of VS SP will be already installed when you try to install VSTS RTM… would that work… I haven’t tried.  According to Aaron it should… Hold off on installing SQL 2008 if you have Visual Studio 2008 RTM installed - for now (see on the bottom of this post).  I know what I just documented works I’ve done that.

 

2) Upgrade SQL

Well that’s a bit trickier, Chris Rathjen from Microsoft sent me this info about that upgrade path

i. Start downtime

ii. Upgrade SQL2005 to SQL2008; AT will stop working at this step

iii. Apply TFS SP1 (and VS sp1 if the client is on the AT); AT will work again

iv. Verify full functionality

v. End downtime

 

If you apply SP1 before the upgrade, there’s an extra step:

i. Start downtime

ii. Apply TFS SP1 (and client…)

iii. Upgrade SQL2005 to SQL2008; AT will stop working at this step

iv. Repair TFS AT; AT will work again

v. Verify functionality

vi. End downtime

 

Well there you have it a somewhat complete picture of the upgrades and installs of the various Service Packs.  It was much less painful than the VS 2005 experience and I have to give kudos to Microsoft for that.  That was a hard experience.  I hope this will be useful to you, and don’t hesitate to leave me a comment if you have any issues and I will get answers for you.

Good luck,

ET


I really meant to post about ImageCup but when I came back I went strait to vacation and now it feels like ages ago.  I was a great competition again this year.  I’m always impressed by the quality of the ideas that the student come up with.  We saw things like water management off farms (the winners), electricity consumption solution, home automation, CO2 monitoring, controlled species monitoring, and much more, the subject being creating a sustainable environment those are pretty big problems to tackle.  It’s the second time I judge for the IC and for the second time it was really great.  This year we had a single pool for all the team and that way the top 12 teams where indeed the top 12 teams.  I was a little sceptic at first but in the end I think it was best for everyone.

Next year it’s in Cairo Egypt, I’m really looking forward to participating again.  The judging will be much harder since it’s an open theme, so it’s going to be hard to compare and note.  Should be exiting though.

Until next year, here is a picture of the winners team SOAK Australia.

Those are all the winners

This was the announcement of the Cairo competition…

Cheers,

ET

Technorati Tags:

Wednesday, May 28, 2008 #

I'm a judge for the Software Design Invitational category again this year.  I'm super exited about this.  This event is probably the best event you can ever participate and judge in.  The energy at this competition is awesome and everyone put in 200% effort to give the best presentation of their product that they can.  It's impressive to see the amount of work those students put in their solution and this year well be really cool because the subject is the environment.  I can't wait to see what they come up with.  I was blown away last year with what I saw.  Should be really good again this year.

The competition is in Paris in early July.  I will keep you posted with pictures and information then.

I really looking forward to this.  See you in Paris if you are there when I'm there.

Cheers,

ET

Technorati Tags:

I could not pass on this blog post and tell you about that.  Go watch this and appreciate it for what it is; A great geek gadget... I WANT ONE

Brian the Build Bunny

You can get that bad boy here.

Rock on Martin!

Cheers,

ET

Technorati Tags: ,

Friday, May 16, 2008 #

Here is a tool I use all the time. Get the update right here.

 

Additonal Guest Operating System support:
Windows Vista® Ultimate Edition with Service Pack 1 (SP1)
Windows Vista® Business Edition with Service Pack 1 (SP1)
Windows Vista® Enterprise Edition with Service Pack 1 (SP1)
Windows Server® 2008 Standard
Windows XP Professional with Service Pack 3
Additional Host Operating System support:
Windows Vista® Ultimate Edition with Service Pack 1 (SP1)
Windows Vista® Business Edition with Service Pack 1 (SP1)
Windows Vista® Enterprise Edition with Service Pack 1 (SP1)
Windows XP Professional with Service Pack 3

 

Cheers,

ET

Technorati Tags:

Thursday, May 01, 2008 #

Someone at my User Group meeting last Monday asked me if there was a comparative chart to which version of VS he should buy.  I couldn't remember where it was at the time so here it is freshly revised too.

Visual Studio 2008 Product Comparison

 

Cheers,

ET

Technorati Tags: