Clara's Notes on Technology

Just a place to put down ideas and concepts on technology, mainly .NET, BizTalk, SQL Server, and other MSFT stuff.

Friday, October 27, 2006

Girl Geek

While browsing the Tech-Ed 2006, I have found about Girly Geekdom, a blog hold by Sarah Blow to provide information and organize events on girl in IT. They are organizing a dinner at Tech-Ed and I will probably be joining them.

It is really exciting to find out there are people out there like me! I really like my job and I think I am not too bad at it, but sometimes feel lonely or freaky. Also, I've been thinking for a while about organizing some sort of community of Girls in Technology but then realize I don't know any other women in IT :(

The list of attendees at the Geek Girl Dinner at Barcelona contains some Spanish names, so it will be an opportunity to meet real "peers": female, geek and Spanish!

BTW, I found this post from Sarah Blow really funny too: 10 reasons for Girl Geeks to go to Conferences and 10 reasons why thy don't

Thursday, October 05, 2006

VSTS builds

For the last few months I have been helping a client adopt Team System - Team Foundation Server. Since these tools are quite new, I will try to keep a log of what I have done.

Builds: from MSBuild to TFSBuild

The starting situation is an MSBuild script customized for a given team's needs. The default target can execute the following procedure:
  1. Delete network share
  2. Backup latest build
  3. Clean
  4. Get latest from source control
  5. Increase version and add label in source control if building in Release mode
  6. Build
  7. Run NUnit tests
  8. Run FxCop analysis
  9. Run WiX (create msi)
  10. Run NDoc (generate documentation)
  11. Create network share
  12. Drop build output in network share

This script was used both as enterprise build and as developer build by setting different property values. For example, when being run by a developer it would not run the test or the static analysis and it would not increase the version number or set a label in source control.

My proposal consists in the following creating a build type that peforms all the tasks above. Points 1-6 and 11-12 are alreayd done by default by tfsbuild. The network share is in the build drop location, sources are obtained from TFS and copied locally to the build server, a label with the build name is applied automatically, etc. Admittedly, you might want to customize the build number but I will talk about this later.

As for the other points, this is what I suggested:

7- Ideally, move to TS tests and forget about NUnit. In the meanterm, I created a "NUnit" target that runs the test (in fact, I could basically copy/paste the target from the original script).

8- FxCop target is no longer needed since static analysis is integrated in team system and thus in build types (you can indicate it in the build type wizard). For the enterprise build I would set static analysis to "always".

9- I integrated it as a new target in TFSBuild.proj (could be reused almost "as is").

10- Same as 9. Create a specific target for it.


So now I have created 3 new targets in TFSBuild.proj: NUnit, WiX, NDoc. Since I want to run them after compilining I defined them as dependencies of the "AfterCompile" target, like this:

<target name="AfterCompile" dependsontargets="NUnit;WiX;NDoc">

<message text="AfterCompile target executed.">
</message></target>

I have also set a condition on each of the new targets, so that they can be turned on/off at will:


<RunUnitTests>false</RunUnitTests>
...
<Target Name="NUnit" Condition="'$(RunUnitTests)'=='true'">
...
</Target>

My current problem is that I would like to turn on/off these options without having to change the TFSBuild.proj. This way we would have a script (TFSBuild.proj) with all the default values for the options that could be run from the team explorer. If we want to run the tf build with other options, I would like to be able to do it with the command line (tfsbuild.exe tool). But that does not seem to be possible.


It is possible to override the options values if you execute the TFSBuild.proj script from MSBuild.exe, but then you lose the advantages of TF builds (build server, drop locations, automatic get and label, etc.). In fact I am using MSBuild.exe to run TFSBuild.proj for developer builds as described here.