Mike's profileFreeToDevBlogLists Tools Help

Blog


    January 25

    Using the TFS Build Number Task with TFS 2008

    UPDATE: 13 July 08 --- These tasks are now available in the FreeToDev MSBuild Tasks Suite

    The sample code provided in the blog post covering this light weight task needs to be tweaked if using TFS 2008:

    TFS 2005:

    <GetBuildNumber BuildType="$(BuildType)" BuildNumber="$(BuildNumber)" Format="Elapsed" StartDate="1 Jan 2007" ZeroPadding="4" Major="2" Minor="1">
            <Output TaskParameter="AssemblyFileVersion" PropertyName="ElapsedBuildNo" />
    </GetBuildNumber>
    <GetBuildNumber BuildType="$(BuildType)" BuildNumber="$(BuildNumber)" Format="Date" DateFormat="MMdd" Major="2" Minor="1">
            <Output TaskParameter="AssemblyFileVersion" PropertyName="DateBuildNo" />
    </GetBuildNumber>

    TFS 2008:

    <GetBuildNumber BuildType="$(BuildDefinition)" BuildNumber="$(BuildNumber)" Format="Elapsed" StartDate="1 Jan 2007" ZeroPadding="4" Major="2" Minor="1">
            <Output TaskParameter="AssemblyFileVersion" PropertyName="ElapsedBuildNo" />
    </GetBuildNumber>
    <GetBuildNumber BuildType="$(BuildDefinition)" BuildNumber="$(BuildNumber)" Format="Date" DateFormat="MMdd" Major="2" Minor="1">
            <Output TaskParameter="AssemblyFileVersion" PropertyName="DateBuildNo" />
    </GetBuildNumber>

    FreeToDev

    January 14

    Getting Started With LINQ

    UPDATED: 19 Jan 2008

    I've been taking a look at LINQ over the last few days and decided to highlight a few good places to start if you are also new to LINQ.

    First, a lot of the sample LINQ code uses new C# 3.0 functionality, so it's best to read and understand this document first:

    1. C# 3.0 Language Enhancements Hands On Lab, and also watch a movie here

    Then I suggest reading the MSDN content (if you can live with the awful navigation...)

    2. Language-Integrated Query (LINQ) on MSDN. (NOTE: there is a lot of information here, if your mind starts drifting, move on to the Hands On Labs for a break.)

    Then do the following two Hands On Labs

    3. LINQ Hands On Labs

    4. LINQ to SQL Hands on Lab (Optional, i.e. only if you intend working with SQL)

    Then I suggest working through as many LINQ samples as possible

    5. LINQ Samples

    The next step is to take a look at some of your old code and refactor it using LINQ where applicable. Practice makes perfect!

    That should give you a pretty good foundation. You may wish to purchase a book to gain a more solid understanding, or you can download the free PDF version of Introducing Microsoft LINQ.

    Good Luck... FTD

    Regular Expression Scratchpad v2

    It's been some time since I released version 1 of this tool & I thought I would share the updates I have added over the last few months...

    ScreenShot017

    New in V2

    • Replace in Files
    • Customisable RegEx Library supporting recursive execution over text.
      • A more user friendly editor will ship when I get time...
      • A sample 'CleanHTML' library ships with this version.
    • Matcher - a small utility to search two pieces of text simultaneously
    • UI redesign
    • MSI installer

    Version 2 is available to download now...FTD