If you are using Team Foundation Server as your SCM tool, I hope you're taking advantage of using the Team Build tool to create re-producable public builds for your projects. Very cool, and very useful, especially for those Enterprise applications. As you use Team Build you'll need to make changes to how your build process is executed. You can make the customizations in the TFSBuild.proj file. This is the file that will drive your team build. In this file there are many properties declared that are generated by the New Build Type Creation Wizard. These properties are contained in the first PropertyGroup element in that file. Some of these properties include; Description, DropLocation,BuildDirectoryPath,... which are used internally by Team Build to setup the build. Of course Team Build uses MSBuild to actually execute the build, but some things need to happen before/after MSBuild gets involved. For instance creating the Build report, which require those values. In the ideal world you'd expect for those values to be gathered using the MSBuild Object Model, but this is not the case. Team Build is extracting those values as they are declared.
There has been a few posts about this particular problem on the MSBuild MSDN Forum. Those posts are at:
Post: Property Evaluation Order (beta 3)
Properties in properties
In the post Property Evaluation Order (beta 3) I provide a workaround for most situations, but its not always perfect. Here it is for you to see:

It seems like Team build is not using the msbuild object model to get those evaluated properties, but instead are simply extracting the text value from those property declarations.

I tried to overwirte it in different places in the project file as well, with no luck. It always took the first declaration. I'm guessing that the property is not able to be overwritten because it is passed in as a command line parameter to msbuild.exe by team build. But there is a workaround that solves some of the issues. In your TFSBuild.proj file, modify the DropLocation to one that doesn't use any properties and insert the following towards the bottom:

  <PropertyGroup>

    <RootProjectFolder>ProjectXRootProjectFolder>

 

    <DropBuildDependsOn>

      FixDropLocation;

      $(DropBuildDependsOn);

    DropBuildDependsOn>

  PropertyGroup>

 

  <Target Name="FixDropLocation">

    <CreateProperty Value="$(DropLocation)\$(RootProjectFolder)">

      <Output TaskParameter="Value" PropertyName="DropLocation"/>

    CreateProperty>

    <Message Text="Drop loc: $(DropLocation)" Importance="high"/>

  Target>

This prepends the FixDropLocation to the DropBuildDependsOn list of targets, so it will be executed before the DropBuild target. This cause your project drop files to be dropped in the location tat you want. This is able to overwrite the DropLocation property becuase we are using the CreateProperty task to overwrite this instead of the normal property declaration.

This is not however a perfect solution, because your build log will always be located in the DropLocation that was originally declared (the one w/o the property embedded within it). And in the Team build type history the drop location will also have this location as well. But it does place the files where you want them :)

Unfortunately it looks like the DropLocation that is given to TFS is happening outside the scope of MSBuild so I'm not sure you have a lot of options. You can't even pass this as a command line parameter to the tfsbuild.exe utility either. Let me know if this  is not clear.


Sayed Ibrahim Hashimi



Comment Section

Comments are closed.


VS Service Packs!

Comments [0]
In case you haven't already heard a service pack will be released for both VS 2003 & VS 2005 this year! SP1 for VS 2003 is scheduled to ship during the second quarter, and SP1 for VS 2005 in the third. You can read more about this at: http://msdn.microsoft.com/vstudio/support/servicing/. I think its kind of interesting that VS2003 didn't have a service pack for 3 years, yet 2005 is having one not even 1 year later. Perhaps because of all the new features that were shipped with this version, however VS 2003 shipped with many new features as well. Since MSBuild is technically a part of the .NET Redistributable, I'm not sure if the service packs will impact anything related to MSBuild. If I find out more I'll be sure to post more.

Sayed Ibrahim Hashimi


Comment Section

Comments are closed.


MSBuild Tigris tasks

Comments [0]

Previoiusly I wrote about the Microsoft SDC Tasks library, there is another great resource for MSBuild tasks. This is the MSBuild Tigris Tasks project. This is an open source project, so you can submit your tasks to this library as well. Tigris.org is known for their Source Control Management (SCM) tool, Subversion. I've used Subversion previously and was pleased with it, but my favorite is Team Foundation Server :) If you're using Subversion as your source control you'll be glad to find many task for accessing your repository. From the project's site here is a list of the MSBuild tasks that are either completed or currently under development.

Task

Description

AppPoolController*

Allows control for an app pool on a local or remote machine with IIS installed.

AppPoolCreate*

Creates a new application pool on a local or remote machine.

AppPoolDelete*

Deletes an existing application pool on a local or remote machine.

AssemblyInfo

Generates an AssemblyInfo file using the attributes given.

Attrib*

Changes the attributes of files and/or directories

FileUpdate*

Replace text in file(s) using a Regular Expression.

FtpUpload

Uploads a file using File Transfer Protocol (FTP).

FxCop*

Uses FxCop to analyze managed code.

Mail

Sends an email message.

Math.Add

Add numbers.

Math.Divide

Divide numbers.

Math.Multiple

Multiple numbers.

Math.Subtract

Subtract numbers.

Move*

Moves files on the filesystem to a new location.

NDoc

Runs NDoc to create documentation.

NUnit

Runs tests using the NUnit.

RegistryRead

Reads a value from the Registry.

RegistryWrite

Writes a value to the Registry.

Script*

Executes code contained within the task.

ServiceController*

Task that can control a Windows service.

ServiceQuery*

Task that can determine the status of a service.

Sleep*

A task for sleeping for a specified period of time.

SqlExecute*

Executes a SQL command

SvnCheckout

Checkout files from Subversion

SvnClient

Subversion Client

SvnCommit

Commit files to Subversion

SvnExport

Export files from Subversion

SvnInfo*

Get Subversion information for a file or directory.

SvnUpdate

Update files from Subversion

SvnVersion

Get Subversion revision number of a local copy

TaskSchema*

Generates a XSD schema of the MSBuild tasks in an assembly.

Time*

Gets the current date and time.

Unzip

Unzip a file to a target directory.

Version

Increments a four-part version number stored in a text file

VssAdd*

Adds files to a Visual SourceSafe database.

VssCheckin*

Checks in files to a Visual SourceSafe database.

VssCheckout*

Checks out files from a Visual SourceSafe database.

VssClean*

Removes VSS binding information and status files from a solution tree.

VssDiff*

Generates a diff between two versions of an item in a Visual SourceSafe database.

VssGet*

Gets the latest version of a file or project from a Visual SourceSafe database.

VssHistory*

Generates an XML file containing the history of an item in a VSS database.

VssLabel*

Labels an item in a Visual SourceSafe database.

VssUndoCheckout*

Cancels a checkout of an item from a Visual SourceSafe database.

WebDirectoryCreate*

Creates a new web directory on a local or remote machine.

WebDirectoryDelete*

Deletes a web directory on a local or remote machine

WebDownload*

Downloads a resource with the specified URI to a local file.

XmlRead

Reads a value from a XML document using a XPath.

XmlWrite

Updates a XML document using a XPath.

Xslt*

Merge and transform a set of xml files.

Zip

Create a zip file with the files specified.

 * Items not complete or have not been released.

Sayed Ibrahim Hashimi


Comment Section

Comments are closed.


Dreamcatcher preview

Comments [0]

I'm working on an application during my spare time, its called Dreamcatcher. The purpose of this dream is to maintain a digital dream journal, or any journal for that matter. A major goal of the Dreamcatcher is to facilitate finding specific dreams easily, this is going to be accomplished by search mechanisms, and a "tagging" dreams with specific information. For instance you'll categorize the dream, you can place keywords (or labels in gmail terms) onto a dream, and other similar things. These will allow the user to find the desired dream in a set of different ways. Currently all of the data will be stored on the uesrs local machine, but I was also thinking of having a database available for users to keep their entries. This will be determined by user feedback, at a later stage. Here is what the main screen looks like:

http://www.sedodream.com/images/Dreamcatcher/main.jpg

If you are interested in using this app please send me an email (sayed.hashimi [AT] gmail.com )and I'll keep you posted on its progress. I'm expecting to have a useable release in the next couple months.

Sayed Ibrahim Hashimi


Comment Section

Comments are closed.


Me and Jesus

Comments [4]
A co-worker of mine is playing the role of Jesus in a play at his local church. He had to have fake hair implanted inorder to fulfill the role properly. So this week he is coming to work looking a little different. I thought I'd take a picture so everyone could see this. The information for the play is available at http://www.northfloridapassionplay.com/default.htm



Sayed Ibrahim Hashimi

Comment Section

Comments are closed.


<< Older Posts | Newer Posts >>